PyQT4 App
-
Hi, i try to run this project, but can't install PyQT4. I use PyChram, i try with Python 3.8. and Python 2.7. but can't install PyQT4.
Any help?
https://github.com/molodoj88/xbee-gui -
Hi, i try to run this project, but can't install PyQT4. I use PyChram, i try with Python 3.8. and Python 2.7. but can't install PyQT4.
Any help?
https://github.com/molodoj88/xbee-gui@Mitko
It's a bad idea to try to go back to PyQt4/Qt4 now. How many instructions for installing PyQt4 did you try?Maybe you can find something for PyQt5. Somebody seems to be using that in https://ru.stackoverflow.com/questions/813834/Как-передать-параметры-в-поток-pyqt5. Or update what is at your link to PyQt5.
-
@Mitko
It's a bad idea to try to go back to PyQt4/Qt4 now. How many instructions for installing PyQt4 did you try?Maybe you can find something for PyQt5. Somebody seems to be using that in https://ru.stackoverflow.com/questions/813834/Как-передать-параметры-в-поток-pyqt5. Or update what is at your link to PyQt5.
-
@JonB
So, can i use the example you gave me, to convert PyQT4 to 5?
Or there is other options?@Mitko
I stated that the example I quoted seems already to be in PyQt5. I have no idea what it does, as I don't speak Russian.The github code you quoted is in PyQt4. Personally I would rather update that to PyQt5 than try to install and get PyQt4 working. Up to you.
-
@Mitko
I stated that the example I quoted seems already to be in PyQt5. I have no idea what it does, as I don't speak Russian.The github code you quoted is in PyQt4. Personally I would rather update that to PyQt5 than try to install and get PyQt4 working. Up to you.
-
@JonB
Ok, if i can't use PyQt4, how can i convert this part of the project (that use PyQt4 ) to PyQt5 ?
The project should establish zigbee topology, but i can't test it@Mitko
I don't know if you mean by "part of the project" that you think you can have a project containing some PyQt5/Qt5 stuff and some PyQt4/Qt4 together in one app. If you do think that, you can't. So you have a couple of choices:-
Continue your original route of trying to get PyQt4/Qt4 installed and running, using the various resources you were trying for PyQt4/Qt4, so that you can use xbee-gui as-is. I just think that's rather hard, and not good going forward if you intend to do further development, but I never did that so I don't know.
-
Change xbee-gui code to move to PyQt5/Qt5. I used https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5 and perhpas https://stackoverflow.com/questions/46554746/pyqt4-to-pyqt5-how for that.
-
Find some already-ported version of xbee-gui or ask the original developer. But I don't know that you will get much joy that way.
As you please.
-
-
@Mitko
I don't know if you mean by "part of the project" that you think you can have a project containing some PyQt5/Qt5 stuff and some PyQt4/Qt4 together in one app. If you do think that, you can't. So you have a couple of choices:-
Continue your original route of trying to get PyQt4/Qt4 installed and running, using the various resources you were trying for PyQt4/Qt4, so that you can use xbee-gui as-is. I just think that's rather hard, and not good going forward if you intend to do further development, but I never did that so I don't know.
-
Change xbee-gui code to move to PyQt5/Qt5. I used https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5 and perhpas https://stackoverflow.com/questions/46554746/pyqt4-to-pyqt5-how for that.
-
Find some already-ported version of xbee-gui or ask the original developer. But I don't know that you will get much joy that way.
As you please.
-
-
I try to upgrade from PyQT4 to 5, but now i have other types of errors, that i don't understand.
Can someone help me ?
-
@Mitko
I don't think this is actually anything to do with PyQt, or Qt. If you had copied and pasted the text instead of screenshot I could have quoted from it. But I see a Python3.8json
library loader complaining about some character in its JSON input.The error was, because part one of the files (the json), containing the xbee commands, has Russian in it, so the problem was with UTF-8 encoding, but i fix it.
But now i have the following problem:File "C:/xbee-gui-master/MainForm.py", line 18, in <module> class Block(QtGui.QMainWindow, QtGui.QTreeView): NameError: name 'QtGui' is not defined
How to solve it ?
-
The error was, because part one of the files (the json), containing the xbee commands, has Russian in it, so the problem was with UTF-8 encoding, but i fix it.
But now i have the following problem:File "C:/xbee-gui-master/MainForm.py", line 18, in <module> class Block(QtGui.QMainWindow, QtGui.QTreeView): NameError: name 'QtGui' is not defined
How to solve it ?
@Mitko
Qt5 moved widget code fromQtGui
toQtWidgets
, change to that. You will have to do the same for any other widget stuff. I gave you reference to https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5 for this --- it's the very first item there --- and told you that's what I used to do the porting work. -
@Mitko
Qt5 moved widget code fromQtGui
toQtWidgets
, change to that. You will have to do the same for any other widget stuff. I gave you reference to https://wiki.qt.io/Transition_from_Qt_4.x_to_Qt5 for this --- it's the very first item there --- and told you that's what I used to do the porting work.@JonB
I began to solve this problem, but now i have this error:C:\xbee-gui-master\PyQT\Scripts\python.exe C:/xbee-gui-master/MainForm.py Traceback (most recent call last): File "C:/xbee-gui-master/MainForm.py", line 360, in <module> main() File "C:/xbee-gui-master/MainForm.py", line 355, in main bl = Block() File "C:/xbee-gui-master/MainForm.py", line 26, in __init__ self.setWindowIcon(QtWidgets.QIcon("zigbee.png")) AttributeError: module 'PyQt5.QtWidgets' has no attribute 'QIcon'
-
@JonB
I began to solve this problem, but now i have this error:C:\xbee-gui-master\PyQT\Scripts\python.exe C:/xbee-gui-master/MainForm.py Traceback (most recent call last): File "C:/xbee-gui-master/MainForm.py", line 360, in <module> main() File "C:/xbee-gui-master/MainForm.py", line 355, in main bl = Block() File "C:/xbee-gui-master/MainForm.py", line 26, in __init__ self.setWindowIcon(QtWidgets.QIcon("zigbee.png")) AttributeError: module 'PyQt5.QtWidgets' has no attribute 'QIcon'
-
I change it, but now i have this:
C:\xbee-gui-master\PyQT\Scripts\python.exe C:/xbee-gui-master/MainForm.py Traceback (most recent call last): File "C:/xbee-gui-master/MainForm.py", line 360, in <module> main() File "C:/xbee-gui-master/MainForm.py", line 355, in main bl = Block() File "C:/xbee-gui-master/MainForm.py", line 26, in __init__ self.setWindowIcon(QtWidgets.QGui("zigbee.png")) AttributeError: module 'PyQt5.QtWidgets' has no attribute 'QGui'
-
I change it, but now i have this:
C:\xbee-gui-master\PyQT\Scripts\python.exe C:/xbee-gui-master/MainForm.py Traceback (most recent call last): File "C:/xbee-gui-master/MainForm.py", line 360, in <module> main() File "C:/xbee-gui-master/MainForm.py", line 355, in main bl = Block() File "C:/xbee-gui-master/MainForm.py", line 26, in __init__ self.setWindowIcon(QtWidgets.QGui("zigbee.png")) AttributeError: module 'PyQt5.QtWidgets' has no attribute 'QGui'
-
C:\xbee-gui-master\PyQT\Scripts\python.exe C:/xbee-gui-master/MainForm.py Traceback (most recent call last): File "C:/xbee-gui-master/MainForm.py", line 360, in <module> main() File "C:/xbee-gui-master/MainForm.py", line 355, in main bl = Block() File "C:/xbee-gui-master/MainForm.py", line 26, in __init__ self.setWindowIcon(PyQt5.QGui("zigbee.png")) NameError: name 'PyQt5' is not defined
-
C:\xbee-gui-master\PyQT\Scripts\python.exe C:/xbee-gui-master/MainForm.py Traceback (most recent call last): File "C:/xbee-gui-master/MainForm.py", line 360, in <module> main() File "C:/xbee-gui-master/MainForm.py", line 355, in main bl = Block() File "C:/xbee-gui-master/MainForm.py", line 26, in __init__ self.setWindowIcon(PyQt5.QGui("zigbee.png")) NameError: name 'PyQt5' is not defined
PyQt5.QGui("zigbee.png")
What is this?! You want to use QIcon, right?
It should be I guessQtGui.QIcon("zigbee.png")
It is also shown in the documentation which you should consult: https://doc.qt.io/qtforpython-5/PySide2/QtGui/QIcon.html
-
PyQt5.QGui("zigbee.png")
What is this?! You want to use QIcon, right?
It should be I guessQtGui.QIcon("zigbee.png")
It is also shown in the documentation which you should consult: https://doc.qt.io/qtforpython-5/PySide2/QtGui/QIcon.html
C:\xbee-gui-master\PyQT\Scripts\python.exe C:/xbee-gui-master/MainForm.py Traceback (most recent call last): File "C:/xbee-gui-master/MainForm.py", line 360, in <module> main() File "C:/xbee-gui-master/MainForm.py", line 355, in main bl = Block() File "C:/xbee-gui-master/MainForm.py", line 26, in __init__ self.setWindowIcon(QtGui.QIcon("zigbee.png")) NameError: name 'QtGui' is not defined
-
C:\xbee-gui-master\PyQT\Scripts\python.exe C:/xbee-gui-master/MainForm.py Traceback (most recent call last): File "C:/xbee-gui-master/MainForm.py", line 360, in <module> main() File "C:/xbee-gui-master/MainForm.py", line 355, in main bl = Block() File "C:/xbee-gui-master/MainForm.py", line 26, in __init__ self.setWindowIcon(QtGui.QIcon("zigbee.png")) NameError: name 'QtGui' is not defined
-