Ok, so basically I have a simple table with a QWidget and two buttons, as shown below:
QGridLayout *layout = new QGridLayout; layout->addWidget(viewcontainer,0,0,1,2); layout->addWidget(reset,1,0); layout->addWidget(done,1,1);
This is basically what I want, where "reset" and "done" are buttons. Essentially this is a QWidget, a viewcontainer that changes when the user resizes the window, while the height of the buttons remains unchanged. But by default for gridlayout you need to align the content to the left. If I changed this with:
layout->addWidget(viewcontainer,0,0,1,2, Qt::AlignCenter);
It does what I want, but the graphic is no longer changing (it remains a small constant size). I would like to save the resizing just by tying the widget to the center. Thanks.
source share