[Qt-interest] Resize QGridLayout
Malyushytsky, Alex
alex at wai.com
Tue Nov 17 20:53:30 CET 2009
>>When the size of QWidget I call the function:
>>
>> resizeEvent(QResizeEvent * event)
I am not sure I could follow what are you trying to do and how,
normally you don't call resizeEvent, you call resize().
Why would not use layout of the widget to handle resizing?
Something like this?
QWidget
++ widgetLayou
+QGridLayout1
-QGridLayout2
.QFrame
...
.QSpinBox
...
-QLabel
+QVTKWidget
Then resize() your QWidget.
Regards,
Alex
-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Rannou, Nicolas
Sent: Monday, November 16, 2009 11:56 AM
To: qt-interest at trolltech.com
Subject: [Qt-interest] Resize QGridLayout
Hi all,
I'm currently experimenting troubles while I'm trying to reajust automatically the size of my qt widget.
I'm working with vtk too.
I created a widget:
QWidget
+QGridLayout1
-QGridLayout2
.QFrame
...
.QSpinBox
...
-QLabel
+QVTKWidget
When the size of QWidget I call the function:
resizeEvent(QResizeEvent * event)
There I want to resize the content of my widget:
I can resize the QVTKWidget properly using setGeometry
But I can't resize the content of QGridLayout1
I call QGridLayout1->setGeometry( const QRect & )
QGridLayout1->Update()
but nothing happens, the content of the layout is not resized.
I also tried to resize only QFrame with setFrameRect( const QRect & )
I could not get it working.
What is the good way to resize automatically a such widget?
Thanks
Nicolas
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."
"Please consider our environment before printing this email."
More information about the Qt-interest-old
mailing list