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

Manish Chaturvedi manish_chaturvedi at persistent.co.in
Tue Jul 13 15:16:48 CEST 2010


Thanks Denis for the suggestion. It actually disabled all the buttons on my tool bar but they are not completely removed. The impression of disable buttons were still there on the tool bar. I am on Mac OS 10.5 with Qt version 4.5.3

From: Denis Akhmetzyanov [mailto:dakhmetzyanov at smartlabs.tv]
Sent: Tuesday, July 13, 2010 6:29 PM
To: Manish Chaturvedi
Cc: qt-interest at trolltech.com
Subject: Re: [Qt-interest] How to remove close, minimize and maximize buttons from QWidget.

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<mailto: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<mailto:Qt-interest at trolltech.com>
http://lists.trolltech.com/mailman/listinfo/qt-interest



--
Best regards,
Denis Akhmetzyanov

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100713/ef1ac3af/attachment.html 


More information about the Qt-interest-old mailing list