Results 1 to 3 of 3

Thread: Adding Widgets to a QFrame instance.

  1. #1
    Join Date
    Oct 2010
    Posts
    13
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Adding Widgets to a QFrame instance.

    Hi All,

    I need to add some pushbuttons to an instance of QFrame. I can do this with the help of any of the three layouts. But the problems is I am not able to position my buttons exactly to the place where I want. I tried setGeometry after setting layout but that doesn't seems to be working.

    Please let me know how can I position my widgets in a Frame with or without using the Layouts?

    Regards,
    Siva

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Adding Widgets to a QFrame instance.

    You can use absolute position or layouts. But not both together. Best is to use layouts. If you want to adjust the position inside a layout you can use spacer item or set the margins and spacing of the layout to a proper value.

    Edit: since you are on an embedded device you can use an absolute position since your screen size is fix. But even then try to use a layout.

  3. #3
    Join Date
    Oct 2010
    Posts
    13
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Adding Widgets to a QFrame instance.

    Lykurg,

    Thanks for your valuable suggestion. I tried the same and its working fine...

    Regards,
    Siva

Similar Threads

  1. Adding click event to QFrame
    By FoleyX90 in forum Newbie
    Replies: 4
    Last Post: 17th August 2010, 17:40
  2. Adding qframe with widgets to status bar
    By binaural in forum Newbie
    Replies: 4
    Last Post: 28th May 2010, 14:14
  3. Replies: 5
    Last Post: 18th April 2010, 23:31
  4. QFrame showing 4 different widgets
    By hgedek in forum Qt Programming
    Replies: 1
    Last Post: 6th September 2007, 17:29

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.