
I want to build a Qt5.2 Application in C++ with Visual Studio 2013. I apply the QWidget::resize function to set the size of the QWidget object in the image above to 1200*800. But it seems that the QWidget object can't be that large(there are vertical and horizontal scroll bars).
How can I get the size of the QWidget object expanded to 1200*800 and remove the scroll bars? And how can I get the object at the centre of the application both vertically and horizontally?
Add your widget to QLayout: