Answer the question
In order to leave comments, you need to log in
Is there QSS support for custom widgets?
Darova, Qt-community habr!
I have a question here. There is also a CSS modification in Qt - Qt Style Sheets. But is it possible to use it for "your" custom widgets.
I would like to be able to work with a table like this:
MyWidget {
myproperty: 1;
}
MyWidget::state {
myproperty: 0;
}
Answer the question
In order to leave comments, you need to log in
Own properties - no problem! You declare foo
with
Q_PROPERTY , then in your styles you write:
MyWidget
{
qproperty-foo: red;
}
QWidget#DockPaletteWidgetBox,
QWidget#documentNavigator,
QWidget#UBLibPathViewer,
QWidget#UBLibNavigatorWidget,
QWidget#UBLibItemProperties,
QWidget#UBDownloadWidget,
QWidget#UBTeacherGuideWidget
{
background: #EEEEEE;
border-radius: 10px
border: 2px solid #999999;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question