Widget color gradient
-
Standard Calculator example has nice color gradient, whereas my application using class derived from QWidget and Button derived from QToolButton is flat and has not gradients.
I don't see any piece code in Calculator sample where is set gradient. -
Depends of your OS and the Qt Theme used.
-
OS is the same, I don't see theme settings in *.cpp files of Calculator.
Main difference: Calculator is compiled by Qt Creator, and have .pro my application by CLion a have cmake. -
-
Looks OK here on KDE with Fusion theme.
qDebug()<<QStyleFactory::keys();
qDebug()<<qApp->style()->objectName();("Windows", "Fusion")
"fusion"What's your default theme ?
Have you applied any style sheet somewhere. -
@mpergand said in Widget color gradient:
qDebug()<<QStyleFactory::keys();
qDebug()<<qApp->style()->objectName();Thanks,
Calculator example :("Windows", "Fusion") "fusion"
My application:
("cleanlooks", "gtk2", "cde", "motif", "plastique", "qt5ct-style", "Windows", "Fusion") "qt5ct-style"
I change style:
qApp->setStyle("Fusion");
and is OK
what if style Fusion will not available?
5/7