[Qt-interest] QDialog with rounded "corners"
Malyushytsky, Alex
alex at wai.com
Fri Feb 11 02:49:41 CET 2011
I think the example below does what you want:
http://doc.trolltech.com/4.7/widgets-shapedclock.html
From: qt-interest-bounces+alex=wai.com at qt.nokia.com [mailto:qt-interest-bounces+alex=wai.com at qt.nokia.com] On Behalf Of Markus Franke
Sent: Thursday, February 10, 2011 6:08 AM
To: qt-interest at trolltech.com
Subject: [Qt-interest] QDialog with rounded "corners"
Dear all,
I am having problems when styling QDialog in my Qt application. Basically I would like to have dialog windows which have rounded corners. I have a class "MyDialog" which inherits from QDialog. So far I tried to use stylesheets as follows:
setStyleSheet("MyDialog { background-color: yellow; border-radius: 5px; border-color: black; border-width: 2px; border-style: outset; padding-top: 2px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px}")
The result which I achieve are actually quiet similar to what I want. I see rounded "corners" but it seems like the background is not taken into account as I can see a few pixels of the background color in each of the corners. (see attached dialog.png)
I am on Qt X11 4.6.3. Is there any way how I can remove these artefacts?
Thanks for help and with best regards,
Markus Franke
"Disclaimer: This message is intended only for the use of the individual or entity to
which it is addressed and may contain information which is privileged, confidential, proprietary,
or exempt from disclosure under applicable law. If you are not the intended recipient or the person
responsible for delivering the message to the intended recipient, you are strictly prohibited from
disclosing, distributing, copying, or in any way using this message. If you have received this
communication in error, please notify the sender and destroy and delete any copies you may have
received."
---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.
"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."
"Please consider our environment before printing this email."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110210/1de35b3f/attachment.html
More information about the Qt-interest-old
mailing list