That's not a good approach, you are not taking margins and spacing into consideration. It will fail if you click near a border of a tab. Use QWidget::mapTo() like this:
Qt Code:
int index = tabBar()->tabAt(tabBarPoint);To copy to clipboard, switch view to plain text mode
Bookmarks