QTreeView: Branch-Icons 'altered' by windeployqt?
-
Hello,
we are using Qt 5.12.2 for all of our applications.
After moving away from using the windeployqt tool for app deployment (too unflexible to us) we have encountered some strange behviour of the QTreeViews in our apps:
Instead of displaying the nice and modern looking chevron control icons to expand / collapse branches the old NT style "+" und "-" signs along with actual branch lines are displayed:WITH windeployqt:
WITHOUT windeployqt:
This behaviour can easily be reproduced either by 'just copying' the needed Qt libraries into our app install directory (as we do now) or by using the windeployqt tool (which yields the better looking result but is not an viable option any more).
In order to avoid some conflicts with Qt-Versions of other vendors, we had to compile our own Qt libraries from source adding our own namespace and 'libinfix'.
I recegnized, that during the deployement windeployqt removes a path which was previusly passed in the build process as 'PREFIX' from the Qt5Core.dll, which would not be the case when its just copied. I just don't understand if and how this could be the reason for the QTreeView to be displayed diffently.Does anyone have an idea, what we did wrong here?
-
I've come somewhat further in the process: It seems like Qt defaults to some internal view style if it can't find any plugins under the hard coded 'prefix_path' in Qt5Core.dll.
To test this, I temporarely copied the plugins directory from the Qt bin path to the same path on the target machine and voilá: it displays the control icons nicely and modern as expected.The new question now is: how to get rid of the prefix path in Qt5Core.dll without using windeployqt?
-
When you don't want to use windeployqt for whatever reason you should read the Deploying Plugins page and copy the plugins + directories under your application folder as explained there.