access to class functions/members in QTabWidget
Hi,
In my program i have class like this:
and QTabWidget in a mainwindow where i'm adding WorkingTab into tabs
Code:
WorkingTab *newtab = new WorkingTab;
tab_widget->addTab(newtab,"something")
And my question is...how can i access to WorkingTab class public functions/members via QTabWidget? I have no idea, QTabWidget::widget(int) returning only QWidget...i need my own WorkingTab class.
regards
Re: access to class functions/members in QTabWidget
The best would probably be to store the pointer in alocal variable. If not, cast the pointer into a pointer of your class. If they are Qt classes you can use qobject_cast.