Results 1 to 2 of 2

Thread: how to add a submenu to a context menu of a QTableWidget

  1. #1
    Join Date
    Aug 2010
    Posts
    24
    Thanks
    6
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default how to add a submenu to a context menu of a QTableWidget

    I once use
    Qt Code:
    1. QTableWidget->setContextMenuPolicy(Qt::ActionsContextMenu);
    To copy to clipboard, switch view to plain text mode 
    but now I need a submenu in my context menu,what should I change?
    best wishes,everyone!

  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: how to add a submenu to a context menu of a QTableWidget

    Have a look at the QMenu doc.
    Specifically QMenu::addMenu().
    ==========================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.

Similar Threads

  1. problem with Context Menu in QTableWidget
    By andreime in forum Newbie
    Replies: 6
    Last Post: 7th September 2015, 08:44
  2. Replies: 2
    Last Post: 7th July 2010, 12:18
  3. Context Menu on QTableWidget
    By ankurjain in forum Qt Programming
    Replies: 9
    Last Post: 17th December 2009, 09:52
  4. Context Menu's submenu doesn't appear
    By DancingFirefly in forum Qt Programming
    Replies: 0
    Last Post: 19th August 2009, 20:32
  5. Context menu works slowly on QTableWidget
    By THRESHE in forum Qt Programming
    Replies: 3
    Last Post: 13th March 2008, 19:54

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.