Re: [Php-qt-users] QLineEdit size
Status: Beta
Brought to you by:
tm243
From: Ferenc V. <li...@ne...> - 2005-12-20 22:32:32
|
Hi Jean-Luc, Jean-Luc Gyger wrote: > Hi Ferenc > >> I could not change the width of the input fields, to make the % filelds >> smaller (picture above). I don't know if that is known. size or setSize >> looks implemented in the qlineedit control's interface file. I will >> try >> to not report problems which are obviously not supported yet. ;-) > > > Are you using QBoxLayout or something like this? According you picture, > I would like to say yes. Yes, QHBoxLayout in that case. > If yes, it is not possible to change the size of your qlineedit. Indeed, > QBoxLayout will manage for you the layout of your widget. The only way > if you want to manage it is to place yourself where the widget must be > with their sizes. In QT Designer I can create such an input box, by setting the "maximum size" of the box from 32767 to 50. Inside a vertical QLayout box! (Hint for users: To create QBoxLayout select some widgets and then right click->lay out vertically.) I guess, 32767 or any size bigger than available means "share the space", while a small size says "use exactly this size". I don't know if 32767 has a special meaning to QT (to me it's just 15 "1" bits ;-) ) or does the same like 5000 or 10000... The QT Designer XML section of the right widget looks like this: <widget class="QLayoutWidget"> <property name="name"> <cstring>layGuess_3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> <widget class="QLineEdit"> <property name="name"> <cstring>txtPercent_3</cstring> </property> <property name="maximumSize"> <size> <width>50</width> <height>32767</height> </size> </property> </widget> Maybe it also depends on the QWidget->setSizePolicy setting, but I don't know how to set it up correctly. (I guess the XML QLayoutWidget/<hbox> means QHBoxLayout.) I like this QBoxLayout layouting very much! It is great, that users can resize the dialog to a comfortable size. (See e.g. IE's Security->Custom level dialog, or the Advanced tab of the settings dialog, annoying ones. KDE settings are much better when there is something big.) Maybe that maximum size depends on some more classes which are not yet implemented. Maybe QSizePolicy? Thanks for moving the mailing list! Best regards, Ferenc -- A Microsoft Certified System Engineer is to information technology as a McDonalds Certified Food Specialist is to the culinary arts. |