Results 1 to 2 of 2

Thread: add Context menu QHeader

  1. #1
    Join Date
    Jan 2011
    Location
    Sri Lanaka
    Posts
    64
    Thanks
    39
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Post add Context menu QHeader

    is it possible to add a context menu for QHeader??
    i have a QTreeWidget..i wont to add context menu on right click event of the header..
    can this be done..
    if someone has done this can you please post a example
    thanks..
    Last edited by deepal_de; 6th June 2011 at 09:01.

  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: add Context menu QHeader

    You probably mean QHeaderView.
    And yes this is possible, since QHeaderView is a QWidget.
    See QWidget::customContextMenuRequested ( const QPoint & pos ) signal.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

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

    deepal_de (9th June 2011)

Similar Threads

  1. Context menu on tab
    By wolfi3b in forum Newbie
    Replies: 2
    Last Post: 18th October 2010, 17:35
  2. Context menu
    By dejvis in forum Newbie
    Replies: 2
    Last Post: 20th September 2009, 22:02
  3. Qwt and context menu
    By giusepped in forum Qwt
    Replies: 1
    Last Post: 9th December 2008, 08:55
  4. Context Menu
    By RY in forum Newbie
    Replies: 1
    Last Post: 10th September 2008, 07:59
  5. QTable context menu
    By grabnerj in forum Qt Programming
    Replies: 1
    Last Post: 24th June 2008, 05:20

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
  •  
Qt is a trademark of The Qt Company.