Results 1 to 6 of 6

Thread: Qwidget and layout problem

  1. #1
    Join Date
    Feb 2011
    Posts
    23
    Qt products
    Qt4
    Platforms
    Symbian S60 Maemo/MeeGo

    Default Qwidget and layout problem

    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

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Qwidget and layout problem

    You can take a look at address-book tutorial or this page, and post specific question if you don't understand something, because right now your question is too "generic".

  3. #3
    Join Date
    Feb 2011
    Posts
    23
    Qt products
    Qt4
    Platforms
    Symbian S60 Maemo/MeeGo

    Default Re: Qwidget and layout problem

    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

  4. #4
    Join Date
    Nov 2010
    Location
    Budapest, Hungary
    Posts
    125
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qwidget and layout problem

    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.
    Szilvi

  5. #5
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qwidget and layout problem

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

    Bala

  6. #6
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Thanks
    111
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Qwidget and layout problem

    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?Screenshot.jpg

Similar Threads

  1. Add OpenGl window to the grid layout of the child qwidget.
    By pastispast in forum Qt Programming
    Replies: 1
    Last Post: 26th November 2010, 21:09
  2. Can't add an object derived from QWidget in a layout.
    By Netich in forum Qt Programming
    Replies: 1
    Last Post: 14th January 2010, 21:55
  3. QWidget layout problems
    By MarkoSan in forum Newbie
    Replies: 3
    Last Post: 12th January 2010, 10:23
  4. layout QLabel and QWidget
    By franco.amato in forum Qt Programming
    Replies: 1
    Last Post: 8th January 2010, 11:53
  5. Replies: 4
    Last Post: 8th August 2008, 17:28

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.