2

:D

I'm a Qt beginner and I have some problems.

Generally, all the languages and tools that have an GUI builder have for the window the "Resizeable" property. Very well, I need to do the same in Qt: No window resize, no resize pointer in hover the window's border, maximize button (in the window's title) disabled.

I'm tried to find something but unsuccessfully.

If someone help me, I'll be grateful.

Hug.

Sorry for my english. I'm brazilian. :)

Andrey Luiz
  • 461
  • 9
  • 25

2 Answers2

3

In Qt Creator, I think you can create a non-resizable window by giving it the same minimum and maximum size.

Or you can do it by code using setFixedSize. In that case, just add this line in your window's constructor:

setFixedSize(size());
laurent
  • 88,262
  • 77
  • 290
  • 428
2

Use void QWidget::setWindowFlags ( Qt::WindowFlags type ).
see enum Qt::WindowType for the list of flags you can play with.

For instance, setting Qt::Dialog | Qt::FramelessWindowHint should produce a windows without resize frame and no max/min button.

Chris Browet
  • 4,156
  • 20
  • 17
  • Very good. It works. :D Thank you very much. If have some time, try to help me on this question: http://stackoverflow.com/questions/9656893/qrc-file-ui-file-does-not-work – Andrey Luiz Mar 11 '12 at 16:55