Results 1 to 4 of 4

Thread: Display problem with a custom widget over one another

  1. #1
    Join Date
    Jan 2006
    Posts
    162
    Thanks
    9
    Qt products
    Qt3
    Platforms
    Windows

    Default Display problem with a custom widget over one another

    Hi !

    I have two custom widgets woth same size and position. The last created widget is over the other. When I'm trying to display separatly each widget, only the last created one appears, never the other, why ? I tryed using a widget stack but I have the same problem and don't understand why.

    How could I do to be ble to display each widget ?

    Thanks in advance for the help you will provide me.

  2. #2
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: Display problem with a custom widget over one another

    Support question by some code pls
    a life without programming is like an empty bottle

  3. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Display problem with a custom widget over one another

    Widget stack is especially meant for showing one widget at time. You add a bunch of widgets in a stack and then you change one of them visible at time.
    If you want to show a number of widgets next to each other, use layouts (grid/box..)
    J-P Nurmi

  4. #4
    Join Date
    Jan 2006
    Posts
    162
    Thanks
    9
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: Display problem with a custom widget over one another

    Hi everybody,

    In fact I found two functions raise() and lower(). To be sure the widget I want to show is not covered by another widget I call the function raise() just after each call of show(), and I call lower() each time I call hide() and this works fine.

    I should have tryed to use the widget stack object instead because it's quite the same behaviour but my solution takes only two line and this time I was a bit lazy

    I thank you all for the precious and usefull help you provide me.

Similar Threads

  1. Custom Shape Widget (resize)
    By PiXeL16 in forum Qt Programming
    Replies: 7
    Last Post: 12th February 2007, 07:00
  2. Replies: 1
    Last Post: 5th November 2006, 23:50
  3. Problem with custom widget
    By jnana in forum Qt Programming
    Replies: 3
    Last Post: 15th March 2006, 11:55
  4. Replies: 16
    Last Post: 7th March 2006, 15:57
  5. Replies: 4
    Last Post: 1st March 2006, 23:11

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.