I am trying to add a widget in a QFileDialog( File Open Dialog ). Basically I want to display a message just above the Ok and Cancel button of the QFileDialog.I did some research and one way to achieve this was to get the layout of the QFileDialog and add a Qlabel to it.Here is the code :
QFileDialog box;
QGridLayout *layout = (QGridLayout*)box.layout();
QLabel *openLabel = new QLabel( "Please choose the folder" );
layout->addWidget(openLabel, 0, 0);
box.show();
The Problem here is the openLabel comes over the already present items in the QFileDialog. How do i make the label come just above the Ok and cancel buttons ?and make sure it does not override any other widget ?