Use the following code in the constructor of the QDialog subclass:
setFixedSize(sizeHint());
setFixedSize(sizeHint());
To copy to clipboard, switch view to plain text mode
This is a common solution.
Another, better solution, but requires a top level layout (you have one ), is:
layout
()->setSizeConstraint
(QLayout::FixedSize);
layout()->setSizeConstraint(QLayout::FixedSize);
To copy to clipboard, switch view to plain text mode
This will keep the dialog at a fixed size, but it will also adjust the size in some situations, like when the system font changes.
Regards
Bookmarks