qt - QDialogs using layouts but with a fixed size (no size grip) -
i have several qdialogs
have made in qt designer use layouts, dialog can size correctly depending on size of children. size of children run-time dependent (variable text fields, system font size etc).
it not make sense dialog user-resizeable, want size grip disabled. far can tell, size grip disabled calling setfixedsize()
. however, cannot put in pixel size here, have implemented resizeevent()
so:
void cremoteconnectiondialog::resizeevent(qresizeevent *) { setfixedsize(minimumsize()); }
this works fine on windows, dialog far small on mac os x.
how can achieve program resizable not user resizeable qdialog
takes minimum space requires based on run-time state?
try on dialog:
this->layout()->setsizeconstraint(qlayout::setfixedsize);
Comments
Post a Comment