Within my main window, I have a QVBoxLayout which holds a QTabWidget (appTabs) and a QPushButton (quit). When I expand the application window, quit expands, but appTabs remains the same size. appTabs has a single page that is made up of several widgets and layouts; none of them expand. There's an image attached.app.jpg
I've tried changing this behavior, but I don't understand how to use QSizePolicy. Within my QMainWindow subclass, I've tried
appTabsPolicy = new QSizePolicy(QSizePolicy::Expanding);
To copy to clipboard, switch view to plain text mode
,
but I get the error, "QSizePolicy::QSizePolicy(int)’ is private." I haven't even made it to the point where I'm actually applying the policy. What is the proper syntax? Why would a QTabWidget not automatically expand like the push button?
Added after 1 22 minutes:
Problem solved. The widgets on my QTabWidget were connected by a QSplitter, and the QSplitter needed to be inside a QLayout.
Bookmarks