[Qt-interest] How to remove close, minimize and maximize buttons from QWidget.

Denis Akhmetzyanov dakhmetzyanov at smartlabs.tv
Tue Jul 13 14:59:12 CEST 2010


Hi,
Flag Qt::Tool reduces the thickness of title bar. You could try:

setWindowFlags(Qt::CustomizeWindowHint | Qt::WindowTitleHint);

Qt::CustomizeWindowHint - turns off window title bar and close, maximize,
minimize buttons
Qt::WindowTitleHint - gives window a title bar (without any buttons)

In my environment (Ubuntu 10.04, Gnome, Qt 4.6.3) it is work fine.


2010/7/12 Manish Chaturvedi <manish_chaturvedi at persistent.co.in>

>  Hi All,
>
>
>
> Is there is any way where I can remove the close, maximize and minimize
> buttons from the title bar of  QWidget. I am able to disable them by setting
> the windows flag but unable to remove them from the title bar of the
> Qwidget. I also tried setting the windows flag using the call
> setWindowsFlags(Qt::Tool | Qt::WindowTitleHint | Qt::CustomozeindowHint),
> this removes all the three buttons from the title bar but reduces the
> thickness of title bar. This also makes windows disappear if I click on
> desktop. To re visualize the window I’ll have to click on the application
> icon again.
>
>
>
> Is there is a way to remove all three from the Title bar of QWidget? Do I
> need to choose a different widget to do the same?
>
>
>
> Any help will be appreciated!
>
>
>
> Thanks,
>
> Manish
>
> DISCLAIMER ========== This e-mail may contain privileged and confidential
> information which is the property of Persistent Systems Ltd. It is intended
> only for the use of the individual or entity to which it is addressed. If
> you are not the intended recipient, you are not authorized to read, retain,
> copy, print, distribute or use this message. If you have received this
> communication in error, please notify the sender and delete all copies of
> this message. Persistent Systems Ltd. does not accept any liability for
> virus infected mails.
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>


-- 
Best regards,
Denis Akhmetzyanov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100713/aa90cb7f/attachment.html 


More information about the Qt-interest-old mailing list