Results 1 to 2 of 2

Thread: Context menu on tab header

  1. #1
    Join Date
    Dec 2016
    Posts
    15
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Context menu on tab header

    I currently have a tabwidget for which I connected its customContextMenuRequested signal to a slot that shows a context menu.

    The context menu shows up, but it shows up through the entire area of the tab.

    How do I make it so that the right click opens only when I click on the tab title bar?

    example.jpg

    Sorry for the rough diagram. Currently, my context menu is triggered in the green and blue regions. How do I isolate it to the green region alone?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Context menu on tab header

    Maybe connect to the QTabBar's signal instead?

    Cheers,
    _

Similar Threads

  1. Qt Context menu
    By jeyanthinatarajan in forum Newbie
    Replies: 3
    Last Post: 4th April 2012, 23:26
  2. Replies: 2
    Last Post: 21st February 2012, 11:21
  3. Replies: 1
    Last Post: 4th November 2011, 12:25
  4. Context menu
    By dejvis in forum Newbie
    Replies: 2
    Last Post: 20th September 2009, 23:02
  5. Qwt and context menu
    By giusepped in forum Qwt
    Replies: 1
    Last Post: 9th December 2008, 09:55

Tags for this Thread

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.