Initial Qt5/Python3 switch

This converts the GUI code to use Qt5 and Python3

The GUI is still somewhat buggy, and it can't open files yet,
but seems to be mostly working, extensive testing will
be needed before this can be released.
This commit is contained in:
Salvo 'LtWorf' Tomaselli
2015-02-19 14:00:47 +01:00
parent 98da6fa7f6
commit cf377eca46
11 changed files with 526 additions and 574 deletions

View File

@@ -19,22 +19,21 @@
#
# Module to unify the use of both pyqt and pyside
from PyQt4 import QtCore, QtGui
from PyQt5 import QtCore, QtWidgets
def get_py_str(a):
'''Returns a python string out of a QString'''
return unicode(a.toUtf8(), 'utf-8')
return a
def set_utf8_text(component, text):
component.setText(QtCore.QString.fromUtf8(text))
component.setText(text)
def get_filename(filename):
print (filename)
return str(filename.toUtf8())
def add_list_item(l, item):
history_item = QtCore.QString()
history_item.append(item)
hitem = QtGui.QListWidgetItem(None, 0)
hitem.setText(history_item)
hitem = QtWidgets.QListWidgetItem(None, 0)
hitem.setText(item)
l.addItem(hitem)
l.setCurrentItem(hitem)