How to let a dialog or form have a FIXED size, I don't hope my enduser maximize or stretch my dialog or window. Boys, any ideas?
How to let a dialog or form have a FIXED size, I don't hope my enduser maximize or stretch my dialog or window. Boys, any ideas?
Last edited by adorp; 23rd July 2007 at 18:21. Reason: spelling error
Again : Qwidget::setFixedSize() Which under Designer expands to setting both min and max size to a given value (you may also want to set the size hint as fixed...)
P.S : this very looks like double-thread to me (except for the smiley...)
Current Qt projects : QCodeEdit, RotiDeCode
Thank you for the useful answer, really I appreciate your humour Incidentally, you're the toughest coder I've ever seen!
If I may, an addition to this question:
If I want a window to auto-size itself when it is created to the minimum size that everything will fit in, but not to be adjustable in size by the user how should I do that?
I had been using this which is probably wrong:
resize(sizeHint());
setWindowFlags(Qt:ialog|Qt::MSWindowsFixedSizeDialogHint);
setFixedSize(sizeHint());
or if you have a top layout:
layout->setSizeConstraint(QLayout::Fixed);
Regards
Bookmarks