PDA

View Full Version : Qwidget and layout problem



ram4soft
20th February 2011, 15:26
Hi,

i created a set of labels,buttons and text edits. the problem is i want to set them in some layout or qwidget and set it in a certain position of my window.
please tell me which layout/widget i use and the positioning functions
thanks
Ram

Zlatomir
20th February 2011, 15:38
You can take a look at address-book (http://doc.qt.nokia.com/4.7/tutorials-addressbook.html) tutorial or this page (http://doc.qt.nokia.com/4.7/layout.html), and post specific question if you don't understand something, because right now your question is too "generic".

ram4soft
20th February 2011, 16:06
thanks Zlatomir,
i know what you refereed to, but the whole problem is that i don't know how to set this layout in a some region on the screen
for more explanition, i have a background image for the app and want to set those widgets on a drawn rect of the image :)
thanks

szisziszilvi
21st February 2011, 11:51
I don't see the problem, as you can use a fixed-size layout for anything. One option is that you put those few things into one layout and give a fixed position and size to that, or anouther if you use a layout for the whole widget and give fixed sizes to the wanted regions. I hope this was what you needed. Anyway, I would also recommend the address book tutorial, that is a really nice work.

BalaQT
21st February 2011, 12:09
hi,

want to set those widgets on a drawn rect of the image
UI Designer. just drag n drop.

Bala

MarkoSan
16th March 2011, 07:19
Well, can someone explain me this situation: On Windows, my code works well, on Linux Ubuntu 10.04 LTS Desktop Edition, when I run my app, the app's Main Windows contains some central widget, which to QVBoxLayout is applied (via QWidget::setLayout). Now, once I add QGroupBox with bunch of controls in it, the central widget's layout seems not to work, because QGroupBox is set in upper left corner and no controls inside QGroupBox are visible, since the QGroupBox is not shown properly. I attached screenshot. WHat could be wrong?6094