Results 1 to 2 of 2

Thread: Bring the item to the front at mouse press event

  1. #1
    Join Date
    Jan 2011
    Posts
    212
    Thanks
    24
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Bring the item to the front at mouse press event

    Hello forum,


    I have many items in the graphics scene and i have sub-classed the graphics view. I would like to brint the selected item to the front once the item is selected with a mouse click.

    I have created a slot that does the job , but a bit confused about the signal to throw.

    I want to get it done with the mouse press event.


    Any suggestion ?


    Regards
    Sajjad

  2. #2
    Join Date
    May 2011
    Posts
    240
    Thanks
    4
    Thanked 35 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60

    Default Re: Bring the item to the front at mouse press event

    I think you need to use setZValue() -- give a Z value to each item and when you want one on top, give it the biggest Z value. (As Z value is a qreal, you won't run out of numbers soon, but still scaling back the values after long editing sessions would be neat -- just in case...)

Similar Threads

  1. Bring application window to front
    By St@n in forum Qt Programming
    Replies: 13
    Last Post: 5th July 2019, 01:55
  2. Bring window to the front
    By Barry79 in forum Newbie
    Replies: 2
    Last Post: 14th August 2009, 17:50
  3. Bring QDialog to front
    By mitro in forum Newbie
    Replies: 3
    Last Post: 21st April 2008, 20:32
  4. Qt3 Bring to front application
    By nleverin in forum Qt Programming
    Replies: 1
    Last Post: 7th February 2008, 11:27
  5. How to bring a dialogbox to the front?
    By bood in forum Qt Programming
    Replies: 2
    Last Post: 2nd August 2006, 15:04

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.