I wrote a simple opengl program using QGLWidget. It looks like this
As you can see glwidget takes all the space of the window. How can I resize it?
glViewport() does not help.
I want to make it smaller and add some buttons on the right.
I use this code to add glwidget on the window:
Qt Code:
Window::Window() // constructor { glWidget = new MyGLWidget; mainLayout->addWidget(glWidget); setLayout(mainLayout); setWindowTitle(tr("Hello GL")); }To copy to clipboard, switch view to plain text mode
P.S. Sorry for my English.




Reply With Quote



Bookmarks