how to interact with tabs in qt
Actually i have created three tabs in my app..now on selecting each tab i want to open a new form on that particular tab..the code i have written for creating tabs...
Code:
tabWidget->addTab(pCalender,tr("Calender"));
tabWidget->addTab(pHistory,tr("History"));
tabWidget->addTab(pStatistics,tr("Statistics"));
now i have three forms.
1.calendar.cpp
2.history.cpp
3.statistic.cpp
now what i want is onclick of each tab i want to open each of the form in particular tab...ie calendar form on tab1...history form on tab2 and statistic form on tab 3..so anyone please suggest me how that can be done...
with regards
Rahul
Re: how to interact with tabs in qt
Hi,
See this thread : QStackedWidget-and-QTabWidget-Structure-Advice.
It does what you want I think : you have different forms created somehow, and you want each to show in a page of a tab sheet.
Note that for simple tabs, you can just add all your widgets to the QTabWidget that is returned by addTab. Or just use Qt Designer, define some tab pages, and drag the widgets onto the tab pages.
Best regards,
Marc