[Qt-interest] [Qt-embedded-interest] pixel errors in QListWidget when setting Qt::WA_NoSystemBackground

Markus Franke Franke.M at sebakmt.com
Tue Jun 14 15:00:28 CEST 2011


Dear Atlant,

as per the docs it looks like QDialog does not support the "border-image" 
CSS stylesheet. I also tried to use it in connection with QDialog but it 
didn't work. I still get the background color of the QDialog in the 
rounded corners. Same happens when using border-radius as a stylesheet.

Somehow, the clipping region does not seem to be set up properly.

Any other suggestions how to properly implement a so common feature as 
"rounded" corners for QDialog?

Thanks and with best regards,
Markus


Atlant Schmidt <aschmidt at dekaresearch.com> schrieb am 10.06.2011 17:08:55:

> Markus:
> 
>   To me, it looks like the anti-aliasing is going wrong when there
>   isn?t a ?SystemBackground? for those objects to be drawn against.
> 
>   But that?s just a guess and doesn?t really help you get closer
>   to a solution, so let me ask a question:
> 
>   When you say ?. In order to get correct "rounded corners" for the
>   dialog I am drawing the whole dialog by myself.?, what do you
>   mean by that? The usual way to get the effect you want is
>   provide a background-image or border-image that contains
>   the ?rounded corners? with appropriate 9-slicing hints to allow
>   Qt to stretch the image without distorting the corners.
> 
>   That method works, even in Qt 4.6.x QWS.
> 
>                                       Atlant
> 
> 
> From: 
qt-embedded-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com [
> 
mailto:qt-embedded-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com
] 
> On Behalf Of Markus Franke
> Sent: Friday, June 10, 2011 09:58
> To: qt-interest at qt.nokia.com; qt-embedded-interest at qt.nokia.com
> Subject: [Qt-embedded-interest] pixel errors in QListWidget when setting 

> Qt::WA_NoSystemBackground
> 
> 
> Dear all, 
> 
> I am observing strange pixel errors within the icons of items of a 
> QListWidget. (see attached screenshot) 
> 
> Basically I am creating a QDialog derived class which holds the 
> QListWidget. In order to get correct "rounded corners" for the dialog I 
> am drawing the whole dialog by myself. The pixel errors in the 
screenshot
> attached appeared when I enabled the Qt::WA_NoSystemBackground flag for 
> the QDialog. If I remove this flag the images get displayed correctly 
> again but unfortunately the "rounded corners" will then be wrong. Below 
> the QListWidget I added a QLabel with the same icon as in the 
QListWidget
> and there the problem does not occur. 
> 
> Furthermore, the problem only can be observed for the QWS version of Qt 
> Everywhere 4.6.3. The X11 version does not show this behaviour. 
> 
> Thanks for any comments on this, 
> 
> Markus Franke 
> 
> PS.: I sent this message to both lists because I think it's somewhat 
> related to both versions of Qt. 
> 
> 
> 
> 
> "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."
> Click here to report this email as spam.
> 
> This e-mail and the information, including any attachments, it contains 
> are intended to be a confidential communication only to the person or 
> entity to whom it is addressed and may contain information that is 
> privileged. If the reader of this message is not the intended recipient, 

> you are hereby notified that any dissemination, distribution or copying 
> of this communication is strictly prohibited. If you have received this 
> communication in error, please immediately notify the sender and destroy 

> the original message.
> 
> Thank you.
> 
> Please consider the environment before printing this email.


"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/20110614/049fff2b/attachment.html 


More information about the Qt-interest-old mailing list