I have a custom QTabWidget with a custom QTabBar. I need to determine if a point is in the area next to the QTabBar. (see image)
I have a function that accepts a point representing a mouse cursor position. Using the mapFromGlobal()
function and the QTabBar.rect().contains()
function I can easily determine if the point is inside the QTabBar or not. I then thought it would be easy to determine if the point was inside the tab content or not in a similar way. However, the "page" is larger than the content widget. So by eliminating the QTabBar and the tab content, I can only determine if the point is inside the area shown below:
How can I determine if the point is next to the QTabBar as shown in the first image? Is there a way that I can access the underlying "page" that contains the tab content?