I am unable to set a fixed size on my dialog, how can I do this?

If your dialog does not have a layout, then you can simply call setFixedSize() [doc.qt.nokia.com] on it. If your dialog does have a layout, then you need to call

  1. layout()->setSizeContraint(SetFixedSize)

This will take any changes of the size hint into consideration, i.e. when the user moves a toolbar from top to left in the window, then the fixed height will be smaller, but the fixed width will be bigger to take this into account.

No comments

Write a comment

Sorry, you must be logged in to post a comment.