문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top