Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Make QDialog resize with QWidget.



  • I have a QWidget with a QDialog in it. The QWidget is resizeable and setParent of the QDialog is set to the widget. The dialog pops up on a button click, but has fixed size even when I resize the QWidget. How do I make the QDialog resize itself when the widget is resized ? Both of them have QVBoxLayout.


  • Lifetime Qt Champion

    @kine A QDialog is not part of its parent widget, it is a top level window. So, why should it resize if parent is resized? What is your use case actually?


Log in to reply