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

Color Problem of a QSCROLLBar in an embedded system



  • Hello guys,
    i have a little problem on the color of my background when i'm in an embedded system(working with linux), my background color became a mix between the background color i want and the handler color. in my computer simulation it works fine, but in the embedded system the color is mixed so i need your help to undestand whats happening.

    setStyleSheet(QString("QScrollBar:horizontal{background-color: %2; border: 2px solid %2; border-radius: 1px; margin: 0px; height:15 px;}"
    "QScrollBar::handle:horizontal{background-color: %1 ; min-width:%3;}"
    "QScrollBar::add-line:horizontal {border: none; background: none;}"
    "QScrollBar::sub-line:horizontal {border: none; background: none;}"
    ).arg(Q2UiColorsLocator::get().getDispBackground().name(), Q2UiColorsLocator::get().getDispText().name()).arg(m_scrollerSize));

    Thanks all


  • Lifetime Qt Champion

    Hi
    do you mean something like
    alt text
    kinda effect ?

    Could you try

    QScrollBar::sub-page:horizontal {
    background: red;
    }

    QScrollBar::add-page:horizontal {
    background: green;
    }

    and see if that shows as expected ?
    alt text


Log in to reply