There is no event(Signal) after using insertWidget() method on stackedWidget
hi there!
when i have made a application with imagebutton which come from Qpushbutton.
and I have just made stackedWidget in QtDesigner.
and i put my button widget in editor. like this...
Code:
startBtn = new CImageButton(startTitle, this);
startBtn->setGeometry((width()-373)/2, 200, 373, 71);
startBtn->setImage(sImg1, sImg2);
ui.stackedWidget->insertWidget(0, startBtn);
startBtn->show();
connect(startBtn, SIGNAL(clicked()), this, SLOT(clicked_start_btn())
nomally most widget is show state in QtDesigner.
the button is my own button so i realized that i need show() method to draw button on screen.
so that i can see the button.. but the button doesn't work.. no event.... what happen~~~
please give me a hint as soon as possible.. thank you!
Re: There is no event(Signal) after using insertWidget() method on stackedWidget
Did you change the current index of the stacked widget to the one that represents the page holding the button?
Re: There is no event(Signal) after using insertWidget() method on stackedWidget
Quote:
Originally Posted by
wysota
Did you change the current index of the stacked widget to the one that represents the page holding the button?
sure! i have used curentIndex(0) for stackedWidget in initiate method
Re: There is no event(Signal) after using insertWidget() method on stackedWidget
In that case I don't know what you want... Please try to focus at one thing at a time and describe what you would like to get and what the current result is. insertWidget() doesn't emit any signals so obviously there are none emitted.