Bug 372425

Summary: Does not work with PyQt5 ?
Product: [Applications] kajongg Reporter: Sovxx <benoit.cardinet>
Component: generalAssignee: Wolfgang Rohdewald <wolfgang>
Status: RESOLVED FIXED    
Severity: minor CC: kde-games-bugs-null, wolfgang
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Sovxx 2016-11-13 10:13:47 UTC
Hi,

I am using Windows 10 with Python v3.5.1 and have git cloned the kajongg sources yesterday.

I ran 
py -m pip install pyqt5
in the Windows command prompt and it installed fine.

But I get the following error when I launch kajongg.py :

======= RESTART: C:\Users\sovxx_000\Desktop\maj\kajongg\src\kajongg.py =======
Traceback (most recent call last):
  File "C:\Users\sovxx_000\Desktop\maj\kajongg\src\kajongg.py", line 30, in <module>
    from qt import QObject, usingQt4
  File "C:\Users\sovxx_000\Desktop\maj\kajongg\src\qt.py", line 45, in <module>
    from qt4 import *
  File "C:\Users\sovxx_000\Desktop\maj\kajongg\src\qt4.py", line 23, in <module>
    from PyQt4 import uic
ImportError: No module named 'PyQt4'

Is PyQt4 needed ?
I am wondering because I can see a qt5.py file in kajongg src folder and PyQt4 seems a bit tricky to install... (I am a lazy noob !)

Thanks !
Comment 1 Sovxx 2016-11-13 11:31:41 UTC
Well,
looks like I just had to launch
kajongg.py --qt5
instead.

Would be nice if it could be included in the README file though
Comment 2 Wolfgang Rohdewald 2016-11-13 15:57:36 UTC
I wrote a Windows installer, see https://www.linux-apps.com/content/show.php?content=103206

However I must admit that it might not be quite up to date, I will shortly update it.

But I do not know much about Windows - so if you install kajongg manually, you are on your own.

Up till now kajongg can fallback to qt4 if qt5 is wanted but not installed, I
will have to do it the other way round too: If qt4 is wanted but not installed, automatically try qt5.

That way I will not have to write anything into the README.
Comment 3 Sovxx 2016-11-13 22:03:25 UTC
OK, thank you