Results 1 to 2 of 2

Thread: QTreeView

  1. #1
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default QTreeView

    Hey there,

    There is no rightClick() signal on a QTreeView widget.
    How can I be notified when an item is right clicked in my treeView?

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QTreeView

    Of course you can deal with mouse press event and look which button is used, but you can also - if you are a bad boy - deal with QWidget::customContextMenuRequested (wich is triggered when the right mouse button is used) and then determinate the item via itemAt()! This is of course only possible if you don't want to use this menus...

Similar Threads

  1. Direct root childs inline QTreeView
    By faraslacks in forum Qt Programming
    Replies: 2
    Last Post: 15th January 2009, 08:45
  2. QDirModel and QTreeView cut and paste
    By Micawber in forum Qt Programming
    Replies: 4
    Last Post: 28th May 2008, 21:16
  3. QTreeView help
    By bepaald in forum Qt Programming
    Replies: 1
    Last Post: 15th August 2007, 22:22
  4. background image in QTreeView
    By momesana in forum Qt Programming
    Replies: 2
    Last Post: 11th January 2007, 07:25
  5. paint QTreeView item !!
    By mcenatie in forum Qt Programming
    Replies: 2
    Last Post: 19th March 2006, 15:24

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.