Issue
I want to show the corresponding page when mouse cursor hover on the tab of a QTabWidget
.
For example, when the mouse cursor hover on tab ‘page2’ here , I hope the QTabWidget
shows the corresponding page automatically instead of clicking. How to implement this feature?
Solution
You may try adding an event filter on the QTabWidget object's QTabBar in order to trap the mouse move event. In the filter handler, use QTabBar::tabAt( QPoint ) to find which tab is below the cursor. Set up a timer when the cursor first enters a given tab, reset time when cursor leaves it. When the timer fires, switch active tabs.
Answered By - Brad
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.