QSpinBox::down-arrow shows up as a line when styled with QSS



  • I'm trying to style a QSpinBox with QSS and when I apply any style to the buttons, the arrows disappear, and reappear just as a horizontal line when I style them specifically. Here is a screenshot of the result: https://i.imgur.com/YinYwb6.png

    Is there a way to keep the arrow like in the non-styled button on top?

    QSpinBox {
    background-color: white;
    border: 1px solid rgba(160, 165, 182, 1);
    padding: 3px;
    }

    QSpinBox::down-button {
    background-color: rgba(211, 211, 253, 1);
    border: 1px solid rgba(160, 165, 182, 1);
    padding: 3px;
    }

    QSpinBox::down-arrow {
    background: red;
    }


  • Lifetime Qt Champion

    Hi,

    IIRC, these are note lines but a + and a -. AFAIK, you have to provide the arrows yourself like shown in the example


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.