How to disable the resize cursor

user2429940 picture user2429940 · Aug 29, 2013 · Viewed 8.5k times · Source

I use QWidget::setFixedSize to avoid my window being resized. Even though it works, the resize-style cursor still appears when passing over the edges.

Like this for example: http://bp3.blogger.com/_fhb-4UuRH50/R1ZMKyoIvMI/AAAAAAAAA6s/I08ntfXpp2k/s1600-h/w-resize.gif

Well, you know what I mean. How can I avoid that?

I use Windows 7 with the default windows manager.

Answer

thuga picture thuga · Aug 30, 2013

If this is your mainwindow and you're using Qt 4, you can disable the sizegrip of your mainwindow's statusbar:

this->statusBar()->setSizeGripEnabled(false);

Otherwise you can set the Qt::MSWindowsFixedSizeDialogHint flag to your window:

this->setWindowFlags(this->windowFlags() | Qt::MSWindowsFixedSizeDialogHint);