W
W
Wet_Dumplings2018-11-19 00:51:14
Python
Wet_Dumplings, 2018-11-19 00:51:14

How to port code from PySide to Pyside2/PyQt?

Hey!
I found this story on github - https://github.com/vinay-nagarajan/Steganography--... I
created a project, made myself 3 files of the same name and copied the code, but I got errors when starting

File "D:/PyCharm Community Edition/projet/testStega/SteganographyConsumer.py", line 4, in <module>
   <b> from SteganographyGUI import *</b>
  File "D:\PyCharm Community Edition\projet\testStega\SteganographyGUI.py", line 10, in <module>
   <b> from PySide import QtCore, QtGui</b>
ModuleNotFoundError: No module named 'PySide'

I tried to install `PySide` but it didn't work because of the new version, but I found an alternative - PySide2. Adding the number 2 to `PySide` everywhere caught the following error:
File"path/SteganographyConsumer.py", line 12, in <module>
    class SteganographyConsumer(<b>QMainWindow</b>, Ui_MainWindow):
NameError: name 'QMainWindow' is not defined

And now I couldn't "fix" it.
Actually, how to make this code work in the changed conditions (PySide2)?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question