int load_style(QString &path, QString &name) { int ret = 0; QStyle *s; QPluginLoader pl(path); QObject *o = pl.instance(); if (o != 0) { QStylePlugin *sp = qobject_cast<QStylePlugin *>(o); if (sp != 0) { s = sp->create(name); if (s != 0) { s->setObjectName(name); QApplication::setStyle(s); ret = 1; } } } return ret; }
QStyle *QStylePluginPrivate::create( const QString &key ) { QStyle *st = plugin->create( key ); styles.add( st ); return st; }
QStringList QStylePluginPrivate::featureList() const { return plugin->keys(); }