[PyQt] Help converting python qt4 script to qt5 - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: GUI (https://python-forum.io/forum-10.html) +--- Thread: [PyQt] Help converting python qt4 script to qt5 (/thread-34071.html) |
Help converting python qt4 script to qt5 - Bladeforce - Jun-23-2021 Hi, Could someone help with converting this pyqt4 script to pyqt5 please? When i run it i get this error: I've uploaded the script as an attachmentThanks very much RE: Help converting python qt4 script to qt5 - deanhystad - Jun-23-2021 Replace "from PyQt4..." to from PyQt5..."? RE: Help converting python qt4 script to qt5 - Bladeforce - Jun-23-2021 Hi, I tried changing what you said and now i'm getting this error: I've tried changing this line with the one it thinks it should be and now i get this error
RE: Help converting python qt4 script to qt5 - deanhystad - Jun-23-2021 Looks like your scripts are written in Python 2 and you are now using Python 3. print is a function in Python 3. Here is a porting guide. https://docs.python.org/3/howto/pyporting.html RE: Help converting python qt4 script to qt5 - Axel_Erfurt - Jun-23-2021 change your imports import sys import glob import os import tempfile import subprocess import shlex import shutil from configparser import ConfigParser import urllib from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import *and put all print in brackets RE: Help converting python qt4 script to qt5 - Bladeforce - Jun-23-2021 Thanks for all the help so far! I have done as requested an now get this error
RE: Help converting python qt4 script to qt5 - Axel_Erfurt - Jun-24-2021 self.edit.textChanged.connect(self.edited)
|