PDA

View Full Version : Context menu on tab header



padma
20th July 2019, 00:23
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?

13192

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?

anda_skoa
20th July 2019, 07:52
Maybe connect to the QTabBar's signal instead?

Cheers,
_