Home My Page Projects Code Snippets Project Openings devtools
Summary Activity Tracker SCM

[#2332] QT_QPA_PLATFORM_PLUGIN_PATH

Date:
2020-07-24 08:13
Priority:
3
State:
Open
Submitted by:
Charles Ballard (ccb63)
Assigned to:
Nobody (None)
branch:
py3-meson
type:
none
Summary:
QT_QPA_PLATFORM_PLUGIN_PATH

Detailed description
Stuart McNicholas <stuart.mcnicholas@york.ac.uk>
Reply|
Yesterday, 1:45 PM
Ballard, Charles (STFC,RAL,SC)
However, when actually trying to run a test app:

CCP4MGs-MBP:ccp4i2-pyside2 stuart$ ccp4-python testPySide.py
qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

This means, as far as I understand that Qt5 cannot find its "plugins" directory.

But, if I point to some Qt5.12 plugins I had installed myself, it still fails:

CCP4MGs-MBP:ccp4i2-pyside2 stuart$ QT_QPA_PLATFORM_PLUGIN_PATH=~/Qt/5.12.3/clang_64/plugins/ ccp4-python testPySide.py
qt.qpa.plugin: Could not load the Qt platform plugin "cocoa" in "/Users/stuart/Qt/5.12.3/clang_64/plugins/" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: cocoa, minimal, offscreen, webgl.

Abort trap: 6

This leaves me confused. My plugins/platform directory does indeed seem to contain the 4 plugins listed. I do not know why this fails, I guess my plugins are incompatible with your Frameworks. So, I assume your qt5 plugins need to be in the bundle (this would be true anyway). The qt4 ones are in the bundle.

Closer.

Message  ↓
Date: 2022-01-18 13:38
Sender: Charles Ballard

On windows, less chance of a clash, so === modified file 'ccp4.setup.bat'
--- ccp4.setup.bat 2021-11-19 21:27:51 +0000
+++ ccp4.setup.bat 2022-01-18 13:37:45 +0000
@@ -35,7 +35,7 @@
set GFORTRAN_UNBUFFERED_PRECONNECTED=Y
set HDF5_PLUGIN_PATH=%CCP4%\lib\base\lib\plugins
set SSL_CERT_FILE=%CCP4%\etc\ssl\cacert.pem
-
+set QT_QPA_PLATFORM_PLUGIN_PATH=%CCP4%\QtPlugins
set CCP4I_TCLTK=%CCP4%\bin

:: this may be used by wincoot: #### ?????????????

Date: 2020-07-24 08:15
Sender: Charles Ballard

Yesterday, 1:51 PM
Yes, sorry. All OK, setting QT_QPA_PLATFORM_PLUGIN_PATH to $CCP4/QtPlugins is good. Can now run a jiffy. Many thanks.

No Changes Have Been Made to This Item