I have a stackedWidget.Each page is designed by designer and I need to write functions for this pages?.I tried to write new classes which each of them is for one of this pages.But I couldnt combine?
How can I do?
I have a stackedWidget.Each page is designed by designer and I need to write functions for this pages?.I tried to write new classes which each of them is for one of this pages.But I couldnt combine?
How can I do?
So you want to add widgets to these pages?
Also you will need something to switch between the pages.
Widgets can be added with QStackedWidget::addWidget or QStackedWidget::insterWidget.
Also, you can switch between the pages with QStackedWidget::setCurrentIndex.
You should write custom widgets only if you need them. Otherwise use the existing widgets and layouts.I tried to write new classes which each of them is for one of this pages
Why don't you tell us exactly what you want to do? Maybe we can help you.
Regards
Thanks.
I will explain by example.
I created a widget(has buttons etc) and put this to page1 using designer.Now I need some functions for using this widgets items.So question is this:How can I add these functions to this widget?
(Lets think this so:We created this widget not designer and while creating we added functions as public or private.I want to do this?)
Can you post the code?
You usually access the widgets through the UI object in your class or directly, depending how you used the UI class generated by designer for the window/dialog: subclassed it or added it as a member.
Regards
hgedek (3rd August 2007)
Bookmarks