Question

I am using Qt to do a GUI program, so my problem is, I have made a homepage in my GUI program and I have some 4 tabs tab1,tab2,tab3,tab4 and I have made QPushbutton over at homepage. So can anyone tell me how can I link QPushButton to tab3 of QTabWidget so that when I click the button it should take me to tab 3. Thank you

Was it helpful?

Solution

First create a slot, what handles the buttons click event (Slots, QPushButton) Then use the QTabWidgets setCurrentIndex function like yourTabWidget->setCurrentIndex(2);

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top