| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 4 | |
Hi! I'm doing a simple UI in designer. I want to achive something like this
(asciiart time!):
Main Window
+-----------------------------------+
|+----------------------+ +--------+|
|| | | ||
|| | | ||
|| | | ||
|| Scene | |Controls||
|| | | ||
|| | | ||
|| | | ||
|+----------------------+ +--------+|
+-----------------------------------+
You can find the .ui at [0].
The controls are different widgets all in a vertical layout. The Scene is a
QWidget inherited class.
What I want to achieve is, at the moment of resizing the main window, the
controls should stay with the same width, but the scene has to get wider, for
example:
+--------------------------------------------------+
|+-------------------------------------+ +--------+|
|| | | ||
|| | | ||
|| | | ||
|| Scene | |Controls||
|| | | ||
|| | | ||
|| | | ||
|+-------------------------------------+ +--------+|
+--------------------------------------------------+
If I put a horizontal or a grid layput in the mainwindow that doesn't happens,
the scene remains with the same width (I keep the Controls width constant by
setting one of the widgets maximum width property).
Any ideas?
Thanks in advance!!
[0] http://perezmeyer.com.ar/temp/mainwindow.ui
--
[ signature omitted ]
Attachment:
signature.asc
Description: This is a digitally signed message part.
Hi Lisandro, this is a job for the size policies. Select the viewWidget and in the properties set the sizePolicy->sizePolicy to "MinimumExpanding". Alessandro Lisandro Damián Nicanor Pérez Meyer schrieb: > Hi! I'm doing a simple UI in designer. I want to achive something like this > (asciiart time!): > > Main Window > +-----------------------------------+ > |+----------------------+ +--------+| > || | | || > || | | || > || | | || > || Scene | |Controls|| > || | | || > || | | || > || | | || > |+----------------------+ +--------+| > +-----------------------------------+ > > You can find the .ui at [0]. > > The controls are different widgets all in a vertical layout. The Scene is a > QWidget inherited class. > > What I want to achieve is, at the moment of resizing the main window, the > controls should stay with the same width, but the scene has to get wider, for > example: > > +--------------------------------------------------+ > |+-------------------------------------+ +--------+| > || | | || > || | | || > || | | || > || Scene | |Controls|| > || | | || > || | | || > || | | || > |+-------------------------------------+ +--------+| > +--------------------------------------------------+ > > If I put a horizontal or a grid layput in the mainwindow that doesn't happens, > the scene remains with the same width (I keep the Controls width constant by > setting one of the widgets maximum width property). > > Any ideas? > > Thanks in advance!! > > [0] http://perezmeyer.com.ar/temp/mainwindow.ui > -- [ signature omitted ]
Alessandro Portale schrieb: > properties set the sizePolicy->sizePolicy to "MinimumExpanding". Obviously, I meant sizePolicy->hSizeType... -- [ signature omitted ]
El Martes 16 Octubre 2007, Alessandro Portale escribió: > Alessandro Portale schrieb: > > properties set the sizePolicy->sizePolicy to "MinimumExpanding". > > Obviously, I meant sizePolicy->hSizeType... Great! Thanks! -- [ signature omitted ]
Attachment:
signature.asc
Description: This is a digitally signed message part.