Login  Register

Re: "//need stylesheet for Qt5 on mac" in main.cpp

Posted by dxli on Jan 24, 2016; 3:24am
URL: https://forum.librecad.org/need-stylesheet-for-Qt5-on-mac-in-main-cpp-tp5712853p5712854.html

I believe the GUI was ugly when I tested it on mac.

Do you have a mac there to test this out?

Otherwise, Ries knows better.

ravas wrote
Why is this needed?

    #if defined(Q_OS_MAC) && QT_VERSION > 0x050000
        //need stylesheet for Qt5 on mac
        app.setStyleSheet(
"QToolButton:checked"
"{"
"    background-color: rgb(160,160,160);"
"    border-style: inset;"
"}"
""
"QToolButton"
"{"
"    background-color: transparent;"
"}"
""
"QToolButton:hover"
"{"
"    background-color: rgb(255,255,255);"
"    border-style: outset;"
"}"
        );
    #endif