jmsbc
2nd December 2008, 01:20
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)
: QWidget(parent, flags)
{
ui.setupUi(this);
ui.scrollFrame->setWidget(this);
}
My main looks like this:
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MyWidget w;
w.show();
return a.exec();
}
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.
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)
: QWidget(parent, flags)
{
ui.setupUi(this);
ui.scrollFrame->setWidget(this);
}
My main looks like this:
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MyWidget w;
w.show();
return a.exec();
}
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.