Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Annoying Background-Position problem



  • This is what it looks like:
    !http://i53.tinypic.com/2883xms.png(Click here to view the image)!

    I'd like the magnifying glass image to be on relative position 5,5 on the control. Nothing i do works. you can only use "top/left/bottom/right" with the "background-position". If I specify numbers, it's always "top center". Am I missing something?

    Here's my stylesheet:

    @QLineEdit#SearchBarEditBox {
    background: white;
    background-image: url(:/images/magnifyingGlass.png);
    background-repeat: no-repeat;
    background-position: 5px 5px;
    }@



  • The image by the way is tiny in size, and encompasses the magnifying glass fully.


Log in to reply