Results 1 to 4 of 4

Thread: Promoted widgets and layout boxes

  1. #1
    Join Date
    Mar 2007
    Posts
    9
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question Promoted widgets and layout boxes

    Hi,
    I used QWidget as a place holder for some of my custom widgets and put it in the layout. I had promoted Widget to my custom widget in the designer. Then I had laid them out with a QVBoxLayout using the Qt Designer. But, when I build the program, the laying out seems to have not effect on the promoted widgets. They all appear on the top left corner of my window.. what do i do?
    Please help!!
    Sunil.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Promoted widgets and layout boxes

    Do you get any warnings during any stage of the development? Do your widgets behave correctly when the layout is hand coded?

  3. #3
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Promoted widgets and layout boxes

    Do you move your widgets somewhere in your code ( setGeometry etc...). This could cause them to force their position in the top left corner?

    Could we see the UI with the generic widgets and layouts?

    Regards

  4. #4
    Join Date
    Feb 2006
    Location
    USA
    Posts
    142
    Thanks
    24
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows Android

    Default Re: Promoted widgets and layout boxes

    Are you sure this widget is your custom widget? QDesigner has for quite a while been suffering from a bug of occasionally generating spurious widgets. Generally, the only way to get rid of these widgets is to shut down designer, manually edit your .ui file (backup first), look for unnamed widgets, and remove them.

    Because you have promoted a custom widget based on QWidget, you cannot simply remove all QWidgets from your .ui file... make sure your custom widget has a name and be careful.
    Life without passion is death in disguise

Similar Threads

  1. Resizing problems when applying a layout
    By JimBrown in forum Newbie
    Replies: 1
    Last Post: 21st February 2007, 22:54
  2. QtDesigner Layout Help
    By mentat in forum Qt Tools
    Replies: 5
    Last Post: 13th July 2006, 14:55
  3. QT4 layout of complex dialog is very slow
    By cboles in forum Qt Programming
    Replies: 15
    Last Post: 28th April 2006, 19:57

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.