Add a layout to your central widget if it doesn't have one and place your frame inside that layout.
Add a layout to your central widget if it doesn't have one and place your frame inside that layout.
Hello wysota,
that was my idea too, so I've tried it in many ways already but it don't work for me.
I have attached two screenshots.
For me it looks like, the centralWidget() has a layout. So I've tried this for example:
Qt Code:
setupUi( frameHome );To copy to clipboard, switch view to plain text mode
I can resize the centralWidget, but not the content inside the centralWidget.
I guess, I understand something totally wrong ....![]()
It may have a layout but you are not adding your widget to it.
wysota, you are the greatest!!!!
I've added one line to my code and now it's working.
Qt Code:
myMainWindow->gridLayout->addWidget(frameHome, 0, 0, 1, 1); setupUi( frameHome );To copy to clipboard, switch view to plain text mode
Thanks again for giving me the right idea.
Have a nice day.
Last edited by gboelter; 4th December 2009 at 10:27. Reason: updated contents
Bookmarks