Style Plugin Example does not show red Button
-
hi
Most likely the plugin dll was not copied to the right folder.
This seems to be QTDIR/plugins/styles but not sure as I never made a Style plugin.
Its not a bug with the sample as such. -
hi
Most likely the plugin dll was not copied to the right folder.
This seems to be QTDIR/plugins/styles but not sure as I never made a Style plugin.
Its not a bug with the sample as such.@mrjj
Thanks,
I found that the plugins at
C:...\styleplugin\release\styles\libsimplestyleplugin.a
C:...\styleplugin\release\styles\simplestyleplugin.dll
Isn't it the right location?
The excutable was created in
C:...\styleplugin\release\styleplugin.exe
But still I don't see the red button.
I also put libsimplestyleplugin.a and simplestyleplugin.dll to
QTDIR/plugins/styles
but I could not see the red button. -
@mrjj
Thanks,
I found that the plugins at
C:...\styleplugin\release\styles\libsimplestyleplugin.a
C:...\styleplugin\release\styles\simplestyleplugin.dll
Isn't it the right location?
The excutable was created in
C:...\styleplugin\release\styleplugin.exe
But still I don't see the red button.
I also put libsimplestyleplugin.a and simplestyleplugin.dll to
QTDIR/plugins/styles
but I could not see the red button.@samdol said in Style Plugin Example does not show red Button:
simplestyleplugin.dll
Hi , i think it needs to be placed in predefined folder unless the sample
uses other means to load it. -
@samdol said in Style Plugin Example does not show red Button:
simplestyleplugin.dll
Hi , i think it needs to be placed in predefined folder unless the sample
uses other means to load it. -
@mrjj
Does predefined folder mean QTDIR/plugins/styles?
I also put libsimplestyleplugin.a and simplestyleplugin.dll to there, but it did not make any change.
I used Qt windows binary version.
Do I have to compile Qt itself to use plugin?@samdol said in Style Plugin Example does not show red Button:
QTDIR/plugins/styles
Yes I think so. I have not tried a Style plugin but it was the same with designer plugin.
Should be placed in right folder.
It should be clear from reading the docs.Update:
The sample says
"We set the library to be stored in the styles folder under stylewindow because this is a path in which Qt will search for style plugins."
So maybe it looks there. -
Hi,
You should also add QT_DEBUG_PLUGINS=1 to the environment variables in the Run part of the project panel. That should give you more clues about why it doesn't load.
-
Hi,
You should also add QT_DEBUG_PLUGINS=1 to the environment variables in the Run part of the project panel. That should give you more clues about why it doesn't load.
@SGaist
Thanks, I put qputenv("QT_DEBUG_PLUGINS", QByteArray("1")); before
QApplication app(argv, args); in main(). And I got the following output,
It seems it loaded the simplestyleplugin.dll. I don't understand why it checks
C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/accessible which I don't have. And it
says libsimplestyleplugin.a is not a plugin. I heard that .a is a static
library. This example is for dynamic plugin. I have no idea why I created a
static library.QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qminimal.dll" Found metadata in lib C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qminimal.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qminimald.dll" Found metadata in lib C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qminimald.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "className": "QMinimalIntegrationPlugin", "debug": true, "version": 329218 } "The plugin 'C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qminimald.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qoffscreen.dll" Found metadata in lib C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qoffscreen.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("offscreen") QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qoffscreend.dll" Found metadata in lib C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qoffscreend.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "className": "QOffscreenIntegrationPlugin", "debug": true, "version": 329218 } "The plugin 'C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qoffscreend.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qwindows.dll" Found metadata in lib C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qwindows.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "windows" ] }, "className": "QWindowsIntegrationPlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("windows") QFactoryLoader::QFactoryLoader() looking at "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qwindowsd.dll" Found metadata in lib C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qwindowsd.dll, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "windows" ] }, "className": "QWindowsIntegrationPlugin", "debug": true, "version": 329218 } "The plugin 'C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qwindowsd.dll' uses incompatible Qt library. (Cannot mix debug and release libraries.)" not a plugin QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/platforms" ... loaded library "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platforms/qwindows.dll" QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/platformthemes" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/platformthemes" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/styles" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/styles" ... QFactoryLoader::QFactoryLoader() looking at "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/styles/libsimplestyleplugin.a" "Failed to extract plugin meta data from 'C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/styles/libsimplestyleplugin.a'" not a plugin QFactoryLoader::QFactoryLoader() looking at "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/styles/simplestyleplugin.dll" Found metadata in lib C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/styles/simplestyleplugin.dll, metadata= { "IID": "org.qt-project.Qt.QStyleFactoryInterface", "MetaData": { "Keys": [ "simplestyle" ] }, "className": "SimpleStylePlugin", "debug": false, "version": 329218 } Got keys from plugin meta data ("simplestyle") loaded library "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/styles/simplestyleplugin.dll" currentdir: "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release" QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/accessible" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/accessible" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/Qt5.6.2/5.6/mingw49_32/plugins/accessiblebridge" ... QFactoryLoader::QFactoryLoader() checking directory path "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/accessiblebridge" ...
-
From this line:
loaded library "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/styles/simplestyleplugin.dll"
it looks like it has been loaded, no ? -
From this line:
loaded library "C:/Qt/build-styleplugin-Desktop_Qt_5_6_2_MinGW_32bit-Release/release/styles/simplestyleplugin.dll"
it looks like it has been loaded, no ?