Qt: Difference between revisions
imported>V3vAP Added some error troubleshooting info |
imported>Das-g m →qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "": add filename & programming language for example shell.nix (for workaround) |
||
| Line 36: | Line 36: | ||
{{Commands|<nowiki>env QT_PLUGIN_PATH=/nix/store/d7q3q6wmfccss8gcp09r33xg0wkbz9gb-qtbase-5.11.0-bin/lib/qt-5.11/plugins/ some_qt_app</nowiki>}} | {{Commands|<nowiki>env QT_PLUGIN_PATH=/nix/store/d7q3q6wmfccss8gcp09r33xg0wkbz9gb-qtbase-5.11.0-bin/lib/qt-5.11/plugins/ some_qt_app</nowiki>}} | ||
Another is to set the variable in a shell.nix file like the following {{File|||<nowiki> | Another is to set the variable in a shell.nix file like the following {{File|shell.nix|nix|<nowiki> | ||
with import <nixpkgs> {}; | with import <nixpkgs> {}; | ||
| Line 48: | Line 48: | ||
} | } | ||
</nowiki>}} to be run with {{Commands|nix-shell shell.nix}} | </nowiki>}} to be run with {{Commands|nix-shell shell.nix}} | ||
==== Debugging methods ==== | ==== Debugging methods ==== | ||
As a general rule, exporting <code>QT_DEBUG_PLUGINS=1</code> make qt print where it looks for plugins. | As a general rule, exporting <code>QT_DEBUG_PLUGINS=1</code> make qt print where it looks for plugins. | ||
If a plugin exists in a directory but is ignored with a message like <code>QLibraryPrivate::loadPlugin failed on "/nix/store/...-teamspeak-client-3.1.6/lib/teamspeak/platforms/libqxcb.so" : "Cannot load library /nix/store/...-client-3.1.6/lib/teamspeak/platforms/libqxcb.so: "</code> it can be that the library cannot be <code>dlopen()</code>ed because of dependencies/rpath issues and needs <code>patchelf</code>ing. Exporting <code>LD_DEBUG=libs</code> may prove helpful in this scenario. | If a plugin exists in a directory but is ignored with a message like <code>QLibraryPrivate::loadPlugin failed on "/nix/store/...-teamspeak-client-3.1.6/lib/teamspeak/platforms/libqxcb.so" : "Cannot load library /nix/store/...-client-3.1.6/lib/teamspeak/platforms/libqxcb.so: "</code> it can be that the library cannot be <code>dlopen()</code>ed because of dependencies/rpath issues and needs <code>patchelf</code>ing. Exporting <code>LD_DEBUG=libs</code> may prove helpful in this scenario. | ||