Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) Qt How to allow a Dialog to be resized by the user?

 

How to allow a Dialog to be resized by the user? is a QT FAQ that one is confronted with when one uses QDialog: it cannot be resized and has no minimize or maximize button in its window title bar. How the steps below to solve this.

 

Below is the default QDialog constructor code:

 

Dialog::Dialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Dialog)
{
    ui->setupUi(this);
}

 

Change this code to the code below:

 

Dialog::Dialog(QWidget *parent) :
    QDialog(parent,Qt::Window),
    ui(new Ui::Dialog)
{
    ui->setupUi(this);
}

 

Done!

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict