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

Andy Brice andy at oryxdigital.com
Fri Jan 15 19:19:28 CET 2010


Richard Moe Gustavsen wrote:
> Yes, I saw that. Conside upgrading to Qt-45 (or better; Qt-46), if you 
> can.
> This should work:
>
> class MyWidget : public QWidget
> {
>     public:
>
>     MyWidget::MyWidget( QWidget* parent ) : QWidget(parent, Qt::Tool)
>     {
>     }
>
>     void setVisible(bool visible)
>     {
>         QWidget::setVisible(visible);
>         ChangeWindowAttributes(qt_mac_window_for(this), 
> kWindowNoAttributes, kWindowFullZoomAttribute);
>     }
> };
Richard,

That worked! I had tried that line in the constructor, but it didn't 
work there. Many thanks.

I haven't upgraded from Qt 4.4 because my commercial licence has lapsed 
and I haven't yet fully investigated switching to the LGPL version. 
Switching to dynamic libraries isn't a big deal, but I believe ActiveQt 
and the Qt 3 support layer aren't support in the LGPL version - that 
would be an issue for me.

best regards

Andy Brice
http://www.perfecttableplan.com
http://www.successfulsoftware.net



More information about the Qt-interest-old mailing list