Hi,
I'm not seeing my widget window when I'm trying put it into a QScrollArea with QFrame.
I designed a gui (MyWidget) using designer.
I placed all the buttons of my gui inside of a QFrame (like Wysota suggested in another thread), and then promoted the QFrame to QScrollArea and called it scrollFrame.
So in my code, my constructor looks like this:
MyWidget
::MyWidget (QWidget *parent, Qt
::WFlags flags
){
ui.setupUi(this);
ui.scrollFrame->setWidget(this);
}
MyWidget::MyWidget (QWidget *parent, Qt::WFlags flags)
: QWidget(parent, flags)
{
ui.setupUi(this);
ui.scrollFrame->setWidget(this);
}
To copy to clipboard, switch view to plain text mode
My main looks like this:
int main(int argc, char *argv[])
{
MyWidget w;
w.show();
return a.exec();
}
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MyWidget w;
w.show();
return a.exec();
}
To copy to clipboard, switch view to plain text mode
However nothing shows up when I try to run this. Can somebody please help me figure out how to bring up the scrollbars?
Thank you.
Bookmarks