How to change the size of a button in the QFileDialog? I tried the below code; it compiles but the application exits unexpectedly if I try to load the file dialogue.
Please let me know what is going wrong. I am new to QT. :(
QFileDialog *fdiag = new QFileDialog();
QGridLayout *glayout = static_cast <QGridLayout*>(fdiag->layout());
QLayoutItem *li = glayout->itemAtPosition(3,3);
QRect buttonRect = li->geometry() ;
int newHeight = buttonRect.height() + 20;
int newWidth = buttonRect.height() + 20;
buttonRect.setHeight(newHeight);
buttonRect.setWidth(newWidth);
li->setGeometry(buttonRect);
fdiag->resize(720,480);
fdiag->setWindowTitle("Media Folder");
fdiag->exec();