Python comes with a standard GUI package named Tkinter. Tkinter provides a lot of elements like buttons, sliders, menus, checkboxes, etc (these are named widgets) to create the user interface for your applications. But it does not comes with a drag and drop UI designer like Visual Studio WinForms.
When you create GUI Python apps like Windows applications, it’s really painful to code both application logic and GUI user interface code. You have to write a lot of codes to create a button, checkboxes, etc. There are a lot of 3rd party frameworks available to create GUI using the drag and drop method.
Here is the list of best tools to create Python GUI in the Drag and drop method.
Many Python developers suggest pyQt framework to create Python app GUI. It’s a cross-platform framework. So if you create an application with pyQt you can run that application in many operating systems like Windows, Mac, Linux, and Raspberry Pi. It has its own drag and drop interface named Qt Designer.
When you create Python GUI in Qt designer it produces a special XML format-based file with .ui extension.
you can just import this .ui extension file in your exiting python project or you can convert this .ui file to python .py file format.
Requirements:
- Qt for Python package (PyQt6 or PyQt5 or PySlide6)
- Qt software (To use its Qt designer) or Qt designer from fman build system (only 40 MB)
Step 1: Install Qt Designer
Just install fman build system Qt designer (only 40 MB installer setup file) or download the latest version of Qt like PyQt 6 (for opensource users) using an offline installer or online installer (It’s almost 1GB full setup file).
Note: You can also install Qt designer via pyqt6-tools or pyqt5 tools.
Step 2: Then, install PyQt or Pyslide for Python in a virtual environment
Install PyQt6 using the following pip command (If you want the latest version of PyQT)
pip install PyQt6
or install PyQt5 using the following command
pip install PyQt5
or install pyside using the pip command.
Step 3: Then run Qt Designer and Create UI for your application.
Add a check box, push-button whatever want for your app, and finally, save the file with the .ui extension.
Then you can directly load this .ui file in your Python project or convert this file to python file.
Reference:
wxWidget is a cross-platform GUI library. wxFormBuilder is a GUI builder for wxWidget.
Just install this wxFormBuilder software on your computer. Create UI in its designer window and get code in Python, Php, and C++ programming languages.
First, add Form. Then add a Layout. Now you can insert any other element like a button, text input box, label, etc.
Now you get the GUI code. That it.
Its converts the Figma design file to a GUI file.
First, create a frame in Figma. Name it “Windows”.
Then add Button or Text Input whatever you want. Use the proper name for your design elements.
If you finish your UI design in Figma, click the Share and copy link.
Go to your Profile section -> Settings. Scroll down the screen and create a personal access token. Put any description and copy the token.
Now install Tkinter designer on your system. For that
Navigate to the folder you want to install Tkinter Designer on your system.
Open that folder in Command prompt.
git clone https://github.com/ParthJadhav/Tkinter-Designer cd Tkinter-Designer pip3 install -r requirements.txt
Now run the GUI file to add file URL and token to generate Python UI file.
cd Python [Your installtion Directory/Tkinter-Designer/gui/gui.py
Enter the Token ID, Figma file URL, and set the Output path.
Click Generate. It will generate UI in the “build” folder with gui.py file name.
That’s it.
Python IDEs to create GUI
MD Python Designer (Monthly Subscription & Lifetime license)
Mate Desk Python designer is an IDE-like Visual studio code to create Python applications. It has its own GUI designer to create a python app GUI in Drag and drop method.
Its GUI designer generates Tkinter – TTK-themed widgets code to create the user interface. This software has features like GUI designer, Database browser, create SQLiteMySQL, Postgres databases, build and run your Python .exe apps, etc.
But you have to purchase this app.
RAD tools to create Python GUI
There are some rad tools available like Glade & Pygubu to create Python GUI.
Best online Python GUI generators
Visual Tk.com offer only 7 Tkinder core widgets like the labels, Button, checkBox, Ratio Button, Entry, ListBox, Message & Windows to create your Python UI code online. You can export, or import your currently working project in VisualTK or just copy the Python code. We recommend Visual Tk. Its works very well.
Python-GUI-builder works like visual Tk. Just select the type of object you want in that list -> assign the settings and click the “use these values” button.
It will generate code for the object. That’s it.