[PyQt] Stylesheet in QLineEdit

Bram Marien B.Marien at Intersentia.be
Wed Aug 4 14:25:26 BST 2010


Hi,

We have created a QLineEdit field, in which we have set the stylesheet (using setStyleSheet) to the following value :

'''background-image: url(:/icons/icons/table_add_16.png);
                   background-repeat: no-repeat;
                   background-position: center right;
                   padding-right: 17px;
                   height: 27px;'''


We notice the background image is not displayed (the padding is set correctly though).
We _think_ it stopped working since we installed PyQt 4.7.4, because before that we used 4.7.2 in which the icon was showed correctly.
The problem manifests on both Windows (Vista) and Linux (Ubuntu 10.4).

If we use the exact same stylesheet in another widget (QPlainTextEdit) the icon is displayed correctly.

Is this a known issue, or is there a problem in the stylesheet itself?

Many thanks in advance,

Bram Mariën
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100804/1eb19b6f/attachment.html>


More information about the PyQt mailing list