Playing with Style Sheets



  • Hello !

    Is there any way to do that ?

    1. Set a user property in a stylesheet and retrieve it in Qt Code ? Something like :

    css:
    @MyClass
    {
    myColor: #FF0000;
    }@

    Qt :
    @void MyClass::paintEvent(QPaintEvent* e)
    {
    QColor myColor = style().getColor("myColor");
    }
    @

    1. Set a color / brush palette role from CSS ? Something like :

    css:
    @MyClass
    {
    palette:ToolTipText: #FF0000;
    }@

    Thanks !


Log in to reply
 

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