Where to find the qtstylesheet grammar rules?
-
Now I just figured out what does the classes mean from the official api.
But somewhere the code likes below:

just look like the css style.But I dont know how to bind this to the qt c++ code.
So if could give me the links to the grammar rules of the qtstylesheet would be great. -
Now I just figured out what does the classes mean from the official api.
But somewhere the code likes below:

just look like the css style.But I dont know how to bind this to the qt c++ code.
So if could give me the links to the grammar rules of the qtstylesheet would be great.@nicker-player said in Where to find the qtstylesheet grammar rules?:
But I dont know how to bind this to the qt c++ code.
Don't know what this means.
So if could give me the links to the grammar rules of the qtstylesheet
https://doc.qt.io/qt-6/stylesheet-reference.html
https://doc.qt.io/qt-6/stylesheet-examples.html
In particular: https://doc.qt.io/qt-6/stylesheet-syntax.htmlYour particular example is an "advanced" one:
.IconfontBtn[white_bk="true"]:disabledThis *selector" applies to:
- A widget of a C++ class named
IconfontBtn.... - ...which has a dynamic property set whose name is
white_bkand which has a value oftrue... - ...and it is currently set to
disabled.
- A widget of a C++ class named
-
@nicker-player said in Where to find the qtstylesheet grammar rules?:
But I dont know how to bind this to the qt c++ code.
Don't know what this means.
So if could give me the links to the grammar rules of the qtstylesheet
https://doc.qt.io/qt-6/stylesheet-reference.html
https://doc.qt.io/qt-6/stylesheet-examples.html
In particular: https://doc.qt.io/qt-6/stylesheet-syntax.htmlYour particular example is an "advanced" one:
.IconfontBtn[white_bk="true"]:disabledThis *selector" applies to:
- A widget of a C++ class named
IconfontBtn.... - ...which has a dynamic property set whose name is
white_bkand which has a value oftrue... - ...and it is currently set to
disabled.
@JonB
Thanks .I just need the links.
And by the way,in the project that some ui objects were created by the codes.There were so many lines of the project,I dont konw how to find the ui object codes from the project.Anything good idea that find the codes quickly? - A widget of a C++ class named
-
@JonB
Thanks .I just need the links.
And by the way,in the project that some ui objects were created by the codes.There were so many lines of the project,I dont konw how to find the ui object codes from the project.Anything good idea that find the codes quickly?@nicker-player
Use search? Search forIconfontBtn? Search forwhite_bk? -
@JonB
Thanks .I just need the links.
And by the way,in the project that some ui objects were created by the codes.There were so many lines of the project,I dont konw how to find the ui object codes from the project.Anything good idea that find the codes quickly?@nicker-player said in Where to find the qtstylesheet grammar rules?:
Thanks .I just need the links.
And by the way,in the project that some ui objects were created by the codes.I assume you mean that some code was generated to match a UI you built in Qt Creator (or Designer). The names in this code will match the names you see in Designer. So if you have a form named MyForm containing a widget with name pathLineEdit in the UI design then the generated code will contain a variable pathLineEdit that you can (usually) access your own code through a the
uipointer like this:ui->pathLineEdit->setText("blah");The actual generated code will be in the build directory in a file called
ui_MyWidget.hthat you will see as:#include "ui_MyWidget.h"in your MyForm class sources.