Results 1 to 2 of 2

Thread: Handling z order of QLabels in QFrames

  1. #1
    Join Date
    Jun 2011
    Posts
    6
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Handling z order of QLabels in QFrames

    Hi guys,

    I got a question on the z order of QLabels in a QFrame.
    The QFrame contains QLabels without any layout, so they can overlap each other.
    The QLabels can be moved by clicking on them and with QLabels::raise() I can guarantee, that the one, that is moving is on top of the other labels.
    My Problem:
    In case I want to drag them out of the QFrame the part of the label that is outside the QFrame.

    How can I get the QLabel in front of its parent QFrame?

    Thanks for answers

  2. #2
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Handling z order of QLabels in QFrames

    You will have to either to dynamically change the parent for pushbutton or add it to the top layout (so by default they are in front of qframe) and then place in right spot.
    Alternatively you can use QGraphicsScene and addWidget() then handle rest of movement there.
    In the near future - corporate networks reach out to the stars. Electrons and light flow throughout the universe.
    The advance of computerization however, has not yet wiped out nations and ethnic groups.

Similar Threads

  1. Two QLabels transparent to each other
    By augusbas in forum Qt Programming
    Replies: 3
    Last Post: 3rd November 2010, 06:19
  2. How to show QLabels
    By Pavel Abrosimov in forum Qt Programming
    Replies: 24
    Last Post: 9th July 2009, 09:39
  3. Dynamic QLabels
    By rajeshs in forum Qt Programming
    Replies: 3
    Last Post: 30th May 2008, 11:26
  4. QSpinBox or QLabels
    By ToddAtWSU in forum Qt Programming
    Replies: 10
    Last Post: 27th November 2007, 20:10
  5. How setEnabled() works on QFrames.
    By Doug Broadwell in forum Newbie
    Replies: 4
    Last Post: 18th October 2006, 19:55

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.