How to remove maximize button in Mac OS X tool window in Qt
Posted
by Andy Brice
on Stack Overflow
See other posts from Stack Overflow
or by Andy Brice
Published on 2010-01-13T18:55:30Z
Indexed on
2010/04/14
8:13 UTC
Read the original article
Hit count: 299
I have a floating tool window. It works fine on Windows, but I can't get
rid of the maximise button on Mac OS X. I have tried unsetting
Qt::WindowMaximizeButtonHint
and setting the window to fixed size.
Nothing seems to work.
MyWidget::MyWidget( QWidget* parent )
:QWidget( parent, Qt::Tool | Qt::CustomizeWindowHint )
{
setupUi( this );
setFixedSize( sizeHint() ); // doesn't remove maximise button
setWindowFlags( windowFlags() & ~Qt::WindowMaximizeButtonHint ); // doesn't remove maximise button
}
I don't want to use a frameless window. Any ideas? I am using Qt 4.4.
© Stack Overflow or respective owner