Results 1 to 4 of 4

Thread: right click on QTreeWidget

  1. #1
    Join Date
    Mar 2008
    Posts
    21
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default right click on QTreeWidget

    Hi

    I'm novice in Qt and I have some questions :
    how can i use QTreeWidget on "file browser" ?
    is there a right click signal on QTreeWidget ? >> i want use a contextual menu

    thank you

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: right click on QTreeWidget

    If u want to browse files, you can use QFileDialog class.

    And every widget has QWidget::contextMenuEvent function which you can override to provide a context menu. You can do the same with QTreeWidget.

    Hope this helps

  3. The following user says thank you to aamer4yu for this useful post:

    hbill (13th March 2008)

  4. #3
    Join Date
    Mar 2008
    Posts
    21
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: right click on QTreeWidget

    Quote Originally Posted by aamer4yu View Post
    And every widget has QWidget::contextMenuEvent function which you can override to provide a context menu. You can do the same with QTreeWidget.

    Hope this helps
    How and where can i call this function ?
    [edit]
    is it a signal ?!!
    [edit]
    thanks
    Last edited by hbill; 13th March 2008 at 16:05.

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: right click on QTreeWidget

    Click on the link in the post.

Similar Threads

  1. QTreeWidget click
    By ^NyAw^ in forum Qt Programming
    Replies: 3
    Last Post: 24th October 2007, 16:47
  2. QTreeWidget right click?
    By jbpvr in forum Qt Programming
    Replies: 2
    Last Post: 20th February 2007, 20:03
  3. QGraphicsScene Click / Double Click
    By philentropist in forum Qt Programming
    Replies: 1
    Last Post: 9th February 2007, 04:32
  4. QTreeWidget double click signal
    By Pinco Pallino in forum Newbie
    Replies: 2
    Last Post: 18th November 2006, 16:37
  5. resizing a QTreeWidget
    By drhex in forum Qt Programming
    Replies: 6
    Last Post: 27th October 2006, 22:32

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.