Commit a1bdba0c authored by Jonathan Wiedemann's avatar Jonathan Wiedemann
Browse files

Fix #20

Compatible with Qt4 and QT5
parent 61685f1d
......@@ -64,8 +64,6 @@ class MoocWorkbench(Workbench):
def Activated(self):
"This function is executed when the workbench is activated"
# import MoocInformations
# MoocInformations.checkMoocWBVersion(MOOC_VERSION) #deactivated version check
print('Activated MoocWorkbench... done')
return
......
......@@ -28,7 +28,7 @@ __author__ = "Jonathan Wiedemann"
__url__ = "http://www.freecadweb.org"
# to make GUI
from PySide2 import QtCore, QtGui, QtWidgets
from PySide import QtCore, QtGui
# to handle resources paths
import os
......@@ -67,6 +67,8 @@ def make_b64_hash(grader_dict):
return encoded_grader
QtWidgets = QtGui
class Ui_FreeCADGrader(QtWidgets.QDialog):
def __init__(self, parent=gui.getMainWindow()):
super(Ui_FreeCADGrader, self).__init__(parent)
......
......@@ -28,7 +28,7 @@ __author__ = "Jonathan Wiedemann"
__url__ = "http://www.freecadweb.org"
# import pyside2 module for ui
from PySide2 import QtCore, QtGui, QtWidgets
from PySide import QtCore, QtGui
# for handling paths
import os
......@@ -76,6 +76,7 @@ moocWB_path = os.path.dirname(moocwb_locator.__file__)
moocWB_medias_path = os.path.join(moocWB_path, 'medias')
moocWB_icons_path = os.path.join(moocWB_medias_path, 'icons')
QtWidgets = QtGui
class Ui_MoocPlayer(QtWidgets.QDialog):
'''The FreeCAD Player interface'''
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment