summaryrefslogtreecommitdiff
path: root/qhexedit2/python/python3_pyqt5
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2023-07-07 12:37:21 +0200
committerToni Uhlig <matzeton@googlemail.com>2023-07-07 12:37:21 +0200
commitfebaef00017278ac65cb7e285564ebc9d5dadfe5 (patch)
tree940ac1386117785496334432dc03a3c0cfa02de5 /qhexedit2/python/python3_pyqt5
parentf41f2dce18111c923c331a3fe6900edee731d040 (diff)
parent004b73ed7ef33cb407897f7eccbec5f3861f99d7 (diff)
Merge commit '004b73ed7ef33cb407897f7eccbec5f3861f99d7' as 'qhexedit2'
Diffstat (limited to 'qhexedit2/python/python3_pyqt5')
-rw-r--r--qhexedit2/python/python3_pyqt5/mainwindow.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/qhexedit2/python/python3_pyqt5/mainwindow.py b/qhexedit2/python/python3_pyqt5/mainwindow.py
new file mode 100644
index 0000000..f583d7e
--- /dev/null
+++ b/qhexedit2/python/python3_pyqt5/mainwindow.py
@@ -0,0 +1,23 @@
+import sys
+from PyQt5 import QtWidgets
+from qhexedit import QHexEdit
+
+
+class HexEdit(QHexEdit):
+
+ def __init__(self, fileName=None):
+ super(HexEdit, self).__init__()
+ file = open(fileName, 'rb')
+ data = file.read()
+ self.setData(data)
+ self.setReadOnly(False)
+
+
+if __name__ == '__main__':
+ app = QtWidgets.QApplication(sys.argv)
+ mainWin = HexEdit('mainwindow.py')
+ mainWin.resize(600, 400)
+ mainWin.move(300, 300)
+ mainWin.show()
+ sys.exit(app.exec_())
+