[Qt-interest] how to remove maximize button in Mac OS X tool window

Richard richardmg at trolltech.com
Thu Jan 14 09:10:15 CET 2010


: QWidget(parent,
      Qt::Tool |
      Qt::WindowTitleHint |
      Qt::WindowCloseButtonHint |
      Qt::CustomizeWindowHint)

-Richard

(BTW: run the $QTDIR/examples/widgets/windowflags example to experiment)
On Jan 13, 2010, at 3:41 PM, Andy Brice wrote:

> 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() );
>   setWindowFlags( windowFlags() & ~Qt::WindowMaximizeButtonHint );
> }
>
> Any ideas? I am using Qt 4.4.
>
> best regards
>
> Andy Brice
> http://www.perfecttableplan.com
> http://www.successfulsoftware.net
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list