Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Styling Qml desktop components

$
0
0
You’re right, I tried to draw a button by inheriting Rectangle and it was easy to style it. However, my team use qml desktop component, button is just a small case :( I tried to modify the plugin like this: “qstyleitem.cpp” . I think I can set the style from there but don’t know how :p     case Button: {         if (!m_styleoption)             m_styleoption = new QStyleOptionButton();           QStyleOptionButton *opt = qstyleoption_cast<QStyleOptionButton*>(m_styleoption);         opt->text = text();         opt->features = (activeControl() == "default") ?                     QStyleOptionButton::DefaultButton :                     QStyleOptionButton::None;     }         break; Another way is “convert” QML to a widget and apply a style for it. But I don’t know how to implement it :p Do you have any comments, ideas …?

Viewing all articles
Browse latest Browse all 4972

Trending Articles