Python Forum
Is there a Python programming environment like VB6 [meta-GUI: GUI making GUI]
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a Python programming environment like VB6 [meta-GUI: GUI making GUI]
#11
Will do. I just PMed because some of the questions were off-topic.

So... PyCharm can incorporate things such as PyQT, etc.? Before I ask any other questions I'll check out the link. Thanks!
Reply
#12
(Sep-09-2017, 02:52 PM)JonathanEngr Wrote: So... PyCharm can incorporate things such as PyQT, etc.? Before I ask any other questions I'll check out the link. Thanks!
You can use PyQT for all editor when install into system as i show with pip in my post.
PyQT comes with stand alone Designer,which is installed pip install pyqt5-tools.
If i start and drag some elements into it,look like this.
This can be a familiar way to design stuff when coming from VB6.
[Image: 7e7QY8.jpg]
Reply
#13
Snippsat--thanks! I'm going to see if I can get it working over the next few days.

Trying to add PyQT to PyCharm...

Okay... this is where things get a bit confusing for me. With VB6, you install it, run it, and voila! You're ready to go. Everything is the the program when you run it. Same with VBA... go into the developer tab in Office products and everything is there. However, now we have the programming language (Python) that I install, the IDE I have (PyCharm) and so-on. I think I've done the right thing by downloading the PyQT 5.9 whl file for Windows 64 bit, but then it comes to a halt. Python 3.5 and above doesn't have an install folder on the root drive (c:), where I assume I'd typically copy the whl file to. So... where do I move the file? Do I open the Python command line to install it? The command line to use seems to be "pip3 install PyQt5", but that's not doing anything but giving me an error. Do I have the whl file in the wrong place? Should I be using the windows command line in tghe directory where the file is located? It's all of these small details that I can't find a "step by step" guide to facilitate the process.

Any guidance/direction would be greatly appreciated!
Reply
#14
  • open command file
  • cd to directory where qt wheel is located
  • type: pip install wheelname

Even if you didn't have the wheel file, you should be able to (from command window)
just type: pip install pyqt5

then you need to follow snippsats instructions and install
voila the qt tools
Reply
#15
Worked like a charm ;-) However, upon completion it did give me an error (I think...?) stating:

"could not find any downloads that satisfy the requirement sip>=4.19.1 (from PyQT5)
No distributions at all found for sip>=4.19.1 (from PyQT5)"

So... I open PyCharm, but what to do from there? I assume I load this set of tools and a GUI will appear with tools for PyQT5?

Also... it recommended that I update the pip installer and I did. It downloaded the file, uninstalled the old version, installed the new but tossed out a page full of errors and exceptions. The very first error gives me an "access denied" status. I'm logged into my admin account...?
Reply
#16
Okay... I finally had some time to sit and focus on this for a bit. I was able to get into the designer and wow! It makes forms that look great, and it's very, very easy.

Now... PyQT simply takes the ui form and converts it to a .py file, correct? Then I simply open/load the form in PyCharm and edit the appropriate code in parts of the form. Is this the correct method/functionality, or am I missing something?
Reply
#17
you don't need PyCharm!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
you can just from command line type: python file.py

If you want to use PyCharm, open PyCharm.
click new project
select the directory containing the .py file as project name
look for the .py file in left window
double click on .py fiile
click run menu
select run  (under run menu)
select .py file

Now, you have to had configured the python interpreter first
this can be done from the project as follows:
click help menu
click on find action
type: settings-->enter
click on Project->Project Interpreter
if you don't see your python interpreter listed in the window, click on pull down arrow
and choose the proper Interpreter
click ok
Now you can run as above
Reply
#18
Larz60+... I wonder if you missed my last post???

From what I have gathered, I create the form in the designer, save it as a .ui file, then use PyQT to convert the file from a .ui to a .py (basically from xml to py). I can then open the .py file in whatever editor I like (notepad, pycharm, whatever) and add the code for the different elements on the form.

Correct?

I think my main misunderstanding was installing PyQT would create a gui creator within PyCharm. This is how VB6 functions... everything is right there within the same program. You can double-click on any widget and it will bring up the code for that particular widget.
Reply
#19
(Sep-10-2017, 12:18 AM)JonathanEngr Wrote: From what I have gathered, I create the form in the designer, save it as a .ui file, then use PyQT to convert the file from a .ui to a .py (basically from xml to py).
You can convert it with pyuic5.exe which is placed PyQt5\Scripts folder.
From command line.
pyuic5 app.ui -o app.py
But that's not needed,can load ui file straight into code.
from PyQt5 import uic, QtWidgets
import sys
 
class Ui(QtWidgets.QDialog):
    def __init__(self):
        super().__init__()
        uic.loadUi('app.ui', self)
        self.show()
 
if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    window = Ui()
    sys.exit(app.exec_())
Quote:I can then open the .py file in whatever editor I like (notepad, pycharm, whatever) and add the code for the different elements on the form.
Correct?
Yes where you work from is up to you.
I have switch from Atom to VS code.
I am impressed bye this free editor,i have quick  review here.

Take also a look part-1 and part-2 for working in Windows.
Reply
#20
Snippsat--thanks!!!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyGUI] Start learning GUI Programming python sumandas89 1 3,201 Jan-18-2019, 02:11 PM
Last Post: Larz60+
Question [Tkinter] Python - help with making a lift admiralsulko 1 3,043 Apr-03-2018, 11:14 AM
Last Post: admiralsulko
  [split] New at Python programming Akash 1 2,805 Nov-10-2017, 07:30 PM
Last Post: heiner55
  New at Python programming rsmldmv 1 2,957 Nov-03-2017, 02:48 AM
Last Post: Larz60+
  [PyGUI] Opinions on Python GUI programming cdn 2 4,937 Aug-26-2017, 11:56 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020