How to utilize Qt plugins when building Qt from source?
-
I have built Qt 5.15 from source (open source version). I have separately checked out the qtstylesplugin from github and built that. How do I use the styles from the plugin with the app I am building using Qt 5.15. Do I need to check out the plugin from within my Qt source and build it there? Do I just need to copy the DLLs I built for the plugin somewhere? Won't I need the source as well?
Sorry for the basic question, but it's my first time trying to get one of these working and google only turned up instructions on how to create plugins, or using them with Qt Creator, when I tried searching for it
-
I have built Qt 5.15 from source (open source version). I have separately checked out the qtstylesplugin from github and built that. How do I use the styles from the plugin with the app I am building using Qt 5.15. Do I need to check out the plugin from within my Qt source and build it there? Do I just need to copy the DLLs I built for the plugin somewhere? Won't I need the source as well?
Sorry for the basic question, but it's my first time trying to get one of these working and google only turned up instructions on how to create plugins, or using them with Qt Creator, when I tried searching for it
@JW16 said in How to utilize Qt plugins when building Qt from source?:
Do I just need to copy the DLLs I built for the plugin somewhere? Won't I need the source as well?
You have to compile the plugin with the same Qt version as you're using on your PC and then copy it to the appropriate plugin subdirectory as explained here.
-
@Christian-Ehrlicher said in How to utilize Qt plugins when building Qt from source?:
You have to compile the plugin with the same Qt version as you're using on your PC and then copy it to the appropriate plugin subdirectory as explained here.
You mean build it using the same qmake version? Or do you mean the plugin source must be incorporated with the Qt source at the time I build Qt in general?
I have built the plugins using the same qmake version, and tried placing the DLLs and source dirs for the styles I want in the QTDIR/plugins/styles dir, as well as the styles dir alongside my app executable, and Qt fails to load them (QStyleFactory::create() returns null for the desired styles). Not sure what I am missing here.
-
@Christian-Ehrlicher said in How to utilize Qt plugins when building Qt from source?:
You have to compile the plugin with the same Qt version as you're using on your PC and then copy it to the appropriate plugin subdirectory as explained here.
You mean build it using the same qmake version? Or do you mean the plugin source must be incorporated with the Qt source at the time I build Qt in general?
I have built the plugins using the same qmake version, and tried placing the DLLs and source dirs for the styles I want in the QTDIR/plugins/styles dir, as well as the styles dir alongside my app executable, and Qt fails to load them (QStyleFactory::create() returns null for the desired styles). Not sure what I am missing here.
@JW16 said in How to utilize Qt plugins when building Qt from source?:
You mean build it using the same qmake version?
qmake? Doesn't matter.
You have to build the plugin with the same Qt version as your app, you want to use the plugin in, is using.