QStyleSheetString is a class for pretty creating, saving, editing and getting CSS StyleSheet for Qt object. This class ONLY for Qt (because he uses another Qt classes).
![photo]
Just download this . And include this class to project:
#include "path/to/class/QStyleSheetString.h"
Don't forget to inslude this class to .pro file (or another configuration file of project).
Simle example how to use QStyleSheetString:
// in constructor we set name of object
QStyleSheetString style("QPushButton");
// set propereties
style.SetPropereties("", "color", "#86ab29");
style.SetPropereties("", "background", "#ffffff");
style.SetPropereties("", "border", "2px solid grey");
style.SetPropereties("", "border-radius", "5px");
style.SetPropereties(":hover", "color", "#ffffff");
style.SetPropereties(":hover", "border", "2px solid #1d7f88");
style.SetPropereties(":hover", "background", "#f24bef");
// apple style to our button
ui->button1->setStyleSheet(style.GetStyleSheet());
Result:
For more examples and usage, please refer to the [Wiki][wiki].
- v.0.1
- Can create, edit and remove selectors...
Pavlo Myroniuk – @TheBestTvarynka – pspos.developqkation@gmail.com
Distributed under the GNU General Public License v3.0 license. See LICENSE
for more information.
https://github.com/TheBestTvarynka/QStyleSheetString
- Fork it (https://github.com/TheBestTvarynka/QStyleSheetString)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request