How to set QMainWindow to fixed size?



  • Hello all,

    I would like my main window to have two properties:

    1. Dynamically change its size according to system default font and size, i.e. it should not have same size on Windows and Linux.

    2. Do not change size during execution as label content may change.

    I tried to use:

    setFixedSize() - fits requirement 2 but not 1.

    layout()->setSizeConstraint(QLayout::SetFixedSize); - fits requirement 1 but not 2.

    Could you please give me some advice?

    Thanks in advance.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.