Results 1 to 4 of 4

Thread: Z order for 'standard' widgets.

  1. #1
    Join Date
    Feb 2006
    Posts
    26
    Thanked 2 Times in 1 Post
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Z order for 'standard' widgets.

    Hi,

    I discovered QCanvas and especially QCanvasItem.

    In QCanvasItem, there is a function setZ wich allows to set wich pixmap should be placed 'in front of' or 'behind' another.

    Is there a way to do such thing for common widgets (QLabel, QFrame, ...) ?

    I think it should be possible without overloading paintEvent() of my widget as Qt4 designer has 'send to back' and 'bring to front' actions in its 'Edit' menu.

    Many thanks in advance.
    Last edited by nouknouk; 21st February 2006 at 01:40.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Z order for 'standard' widgets.

    Is there a way to do such thing for common widgets (QLabel, QFrame, ...) ?
    The question is what for?
    Usually you would use a tab widget when you want ot show various widgets on the same place on form, why wont a tab widget be good solution for you?

  3. #3
    Join Date
    Feb 2006
    Posts
    26
    Thanked 2 Times in 1 Post
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: Z order for 'standard' widgets.

    Ok, I'm sorry, It was quite simple in fact : I missed the two slots QWidget::raise() and QWidget::lower()

    My question was especially for QLabel that are overlapped in my window.

    Anyway, thanks :-)

  4. #4
    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: Z order for 'standard' widgets.

    Overlapping labels? Is that on purpose?

Similar Threads

  1. Qt3 - Multiple transparent widgets
    By bythesea in forum Qt Programming
    Replies: 4
    Last Post: 11th September 2009, 11:24
  2. Upper limit on number of widgets?
    By jdiewald in forum Qt Programming
    Replies: 1
    Last Post: 29th September 2008, 23:00
  3. Replies: 2
    Last Post: 16th May 2008, 14:39
  4. widgets behind hidden widgets not working
    By bpetty in forum Newbie
    Replies: 13
    Last Post: 7th September 2007, 20:23
  5. Tab Order Settings in a QDialog widgets
    By vinnu in forum Qt Programming
    Replies: 10
    Last Post: 21st September 2006, 16:25

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.