Unsolved working of QstlyePlugin
-
Example of QStylePlugin from QDocument:
http://doc.qt.io/qt-5/qtwidgets-tools-styleplugin-example.htmlhow polish function of simplestyle class is getting called.i know about create and keys() function,they are internally called by qstylefactory .
-
@hjohn said in working of QstlyePlugin:
how polish function of simplestyle class is getting called
see QStyle::polish()
-
@raven-worx does it mean it will get called in the background when QWidget runs .
-
@hjohn
since it is a reimplementation of a Qt API method, Qt takes care when to call it.
But what do you want to achieve? -
@raven-worx actually i am just trying to implement plugin same as QStyleplugin.
Want to understand how it works internally. -
@raven-worx In example of QStyleplugin :
http://doc.qt.io/qt-5/qtwidgets-tools-styleplugin-example.html
keys() returns a list of style names that this plugin can create
How to know how many style plugin can create.?
In Qt document there is no any list of style name.and example shows of only one style. -
@hjohn said in working of QstlyePlugin:
How to know how many style plugin can create.?
you decide how many styles your plugin can create and how to name them. see the create() method
-
@raven-worx Here in qstyleplugin example,one style is "simple style" and another one we can add is "fusion" style. they are in-built style. In this case we can not create our own style.
I think in create() method,we manually give style as argument by,QApplication::setStyle(QStyleFactory::create("simplestyle"));
here "simplestyle" is given manually which is built in style.
you decide how many styles your plugin can create and how to name them. see the create() method
In this case we can not create my own style in my plugin.we have to provide built-in style (provided by QT) to my plugin.if I am right then how to know that built-in styles?
Bare with me, I am new in this The High-Level API plugin.I might be wrong. -
Hi,
Maybe a silly question but are you also following the folder setup from the simple plugin example ? Especially where the plugins is located after building ?