2 Attachment(s)
Display one widget at a time
I have a menu option and under it is extract and embedd.
This is the default interface (which is the embedd interface)
Attachment 7816
Now when the user clicks on the extract option a different window should apper. Like the one below
Attachment 7817
And when the user switches back to the embedd option the interface should look like the first image
Any suggestions???
Re: Display one widget at a time
Re: Display one widget at a time
can you give a simple sample?
Re: Display one widget at a time
Read Documentation---->
Code:
stackedWidget->addWidget(firstPageWidget);
stackedWidget->addWidget(secondPageWidget);
stackedWidget->addWidget(thirdPageWidget);
layout->addWidget(stackedWidget);
setLayout(layout);
QStackedWidget provides no intrinsic means for the user to switch page. This is typically done through a QComboBox or a QListWidget that stores the titles of the QStackedWidget's pages. For example:
Code:
pageComboBox->addItem(tr("Page 1"));
pageComboBox->addItem(tr("Page 2"));
pageComboBox->addItem(tr("Page 3"));
connect(pageComboBox, SIGNAL(activated(int)),
stackedWidget, SLOT(setCurrentIndex(int)));
Re: Display one widget at a time
Quote:
Originally Posted by
stbb24
can you give a simple sample?
Things marked green on this forum are hyperlinks, most often to Qt documentation. If you click such link, you'll be redirected to aforementioned documentation. Once you do that, you'll learn that Qt class manuals contain embedded examples or links to external examples of using the class being documented.