[Qt-interest] QDialog with rounded "corners"

Jason H scorp1us at yahoo.com
Thu Feb 10 18:34:55 CET 2011


You'll have to search the web, or labs, but you need to find out how to have a 
top-level widget with transparency. Qt supports this, but I've never worked with 
it. 







________________________________
From: Markus Franke <Franke.M at sebakmt.com>
To: qt-interest at trolltech.com
Sent: Thu, February 10, 2011 9:08:00 AM
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."


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110210/52c96052/attachment.html 


More information about the Qt-interest-old mailing list