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

Some help with .qss editting.



  • Alright, so I've tried everything.. I have no idea why this isn't working. What I'm trying to do is make my drop down menu from File black. Everything I've tried isn't working, been at this for hours now.

    @QMenuBar {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #000, stop: 1 #000);
    color: #000;
    font-weight: bold;
    border: 0px solid transparent;
    border-bottom-color: transparent;
    }
    QMenuBar::item {
    background: #000;
    color: #fff;
    border: 0;
    padding: 4px 8px;
    }
    QMenuBar::item:selected {
    background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #880000, stop: 1 transparent);
    color: #fff;
    }
    QMenuBar::item:pressed {
    background: qlineargradientx1: 0, y1: 0, x2: 1, y2: 0, stop: 0 #880000, stop: 1 transparent);
    color: #000;
    }
    QMenu {
    background-color: #000000;
    border: 2px inset #444444;
    color: #FFFFFF;
    }
    QMenu::item {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 2px 20px 2px 20px;
    }
    QMenu::item:selected {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:0 #666666, stop:1 #000000);
    border: 1px solid #777777;
    }
    QMenu::item:pressed {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:0 #000000, stop:1 #666666);
    border: 1px solid #777777;
    }
    QMenu::item:disabled {
    color: #BBBBBB;
    }
    QMenu::item:disabled:selected {
    background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop:0 #999999, stop:1 #666666);
    border: 1px solid #777777;
    }
    QMenu::separator {
    background: #000000;
    height: 1px;
    }
    QMenu::indicator {
    width: 13px;
    height: 13px;
    padding-left: 1px;
    }@

    !https://lh3.googleusercontent.com/-UcxZw6ng6-M/Tz8i79X8ZiI/AAAAAAAABH4/_nO-e-u3u8o/w224/screenshot.png!



  • Maybe I should clarify a bit. I'm making my dropdowns so they mouseover a dark red fading to transparent, white text, and a black background. Now the problem I'm having is the black background part isn't working. The white text, red fade to transparent works, just.. No black. I've tried hex colors, black background image, none of it's working..


Log in to reply