PDA

View Full Version : QTabWidget: How to prevent user from switching between tabs without disabling tabs;



mut
12th June 2014, 01:03
Hello;

How to prevent user from switching between tabs without disabling tabs?

Suppose I have Tab1, Tab2, Tab3 in the QTabWidget. I want user to stay on Tab2 while still not disabling Tab1 and Tab3, just want to prevent user to go to Tab1 and Tab3.

Thanks;

Mut.

wysota
12th June 2014, 07:27
In my opinion disabling the tabs is the proper way to solve the problem. Other than that you can intercept mouse events but if I were a user of your program, I would just get annoyed by not being able to switch tabs despite a visual hint that the tab is available.