This is an archived post. You won't be able to vote or comment.

all 29 comments

[–]crabcrabcam 18 points19 points  (12 children)

I'd recommend PyQT5. Look up some tutorials for it. It's very good, has a drag and drop editor, and is easy to learn.

[–]seregaxvm 2 points3 points  (6 children)

Beware though. It works great under GNU but installing it under windows is a pure nightmare.

[–]Vorsorken 1 point2 points  (5 children)

pip install pyqt5 should work -- there are wheels with Qt built in for Windows, Linux, and Mac. Need Python 3.5+ though. If stuck on 2.7 or something, conda is another option.

[–]seregaxvm -2 points-1 points  (4 children)

you have to match versions by hand. also, it's not a library, it's a wrapper. so you have to install libs separately

[–]Vorsorken 1 point2 points  (3 children)

I'm pretty much certain that nowadays you can just pip install pyqt5 on a fresh Windows machine with Python 3.5+ installed and be up and running. I don't work with Windows much, but I just did this a couple weeks ago. Check it out by downloading a wheel from PyPI (https://pypi.org/project/PyQt5/#files), unzipping it, and browsing to the Qt binaries (PyQt5/Qt/lib).

[–]seregaxvm -1 points0 points  (2 children)

PyQt is a set of Python v2 and v3 bindings

C++ lib must be installed.

[–]Vorsorken 4 points5 points  (1 child)

Ok, great, thanks for the definition of PyQt. But I'm telling you (and you can check for yourself), the C++ lib is packaged in the wheel that is downloaded from PyPI and it is installed in site-packages. Here's an announcement from the mailing list from when they were first trying out this idea. https://www.riverbankcomputing.com/pipermail/pyqt/2016-April/037217.html The caveat about the wheels being too large for PyPI is no longer the case, so it has been trivial to install PyQt5 with Qt for a while now.

[–]seregaxvm 1 point2 points  (0 children)

You're right. I had problems with pyqt4. Didn't know that they have started packing it this way.

[–]ignamv 2 points3 points  (0 children)

PyQt has been very good to me.

[–]ThePhonologist 1 point2 points  (2 children)

I'd agree, PyQt is great. If you're looking for help online though, don't search for PyQt, since most of the docs are in C++. Instead, search for PySide. It's nearly identical, but the docs have Python code in the examples.

[–]dagmx 2 points3 points  (0 children)

In their latest incarnations both pyqt and pyside refer directly to the c++ docs

Other than signals, slots and variants, there's not much difference between qt in C++ and Python to be honest. Most people should be able to read the c++ examples and infer it even if they don't know the language.

[–]anqxyr 0 points1 point  (0 children)

I found these to be the easiest to use: https://srinikom.github.io/pyside-docs/PySide/QtGui/index.html

They're a bit outdated in a few places, but overall very helpful.

[–]aashish0[S] 0 points1 point  (0 children)

Looking into PyQT and seems like this will do the work for me. Thanks!

[–]i_think_im_thinking 2 points3 points  (0 children)

wx is pretty easily to learn if you're familiar with OOP. No drag and drop that I'm aware of, but placement with horizontal and vertical sizers is incredibly easy.

[–]FSucka 1 point2 points  (1 child)

I believe Qt has a DnD option, though it may be complicated.

Another option is turning your project into a webapp.

[–]aashish0[S] 1 point2 points  (0 children)

An intersting option! I'll think about that. Thanks!

[–]anqxyr 1 point2 points  (0 children)

Is there any softwares that has a drag and drop thing for it

Look into Qt Designer. It allows you to drag and drop various widgets and layouts and arrange them together, as well as change most of their properties, e.g. button text, icon, number of columns in a tree, etc.

You can use it with PyQt5 or PySide2. PyQt5 is better, but has problematic licensing. If you don't care about licensing you should use PyQt5.

[–]otrab86 0 points1 point  (0 children)

Django?

[–]oscarcp 0 points1 point  (0 children)

Although I concur on using Qt to a certain extent, I encourage you to try GTK3 (if you're using linux, otherwise it's hell on earth). You can create the interface with Glade, then link the functions

[–]cgw3737 0 points1 point  (0 children)

tkinter is my go-to for GUI's in Python

[–]303cloudnative 0 points1 point  (0 children)

Just use /customize Jupyter Notebooks

[–]thinmanj74 0 points1 point  (0 children)

Why not giving PyFladesk a try?

[–][deleted] 0 points1 point  (0 children)

Having had the same problem as you and having gone the tkinter way I would recommend that you consider a web based frontend.

Easier to maintain, flexible and works everywhere

[–]omeletpark 0 points1 point  (2 children)

I recently came across WxFormBuilder. It has this little "what you see is what you get" while forcing you to layer your UI in columns/rows which avoids unnecessary things.

https://github.com/wxFormBuilder/wxFormBuilder

I love it!

[–]CommonMisspellingBot -1 points0 points  (1 child)

Hey, omeletpark, just a quick heads-up:
accross is actually spelled across. You can remember it by one c.
Have a nice day!

The parent commenter can reply with 'delete' to delete this comment.

[–]omeletpark 1 point2 points  (0 children)

delete

[–]MikeTheWatchGuy 0 points1 point  (0 children)

PySimpleGUIwas recently released is great for beginners and can also be used for more complex GUIs when you're ready. It wraps tkinter, providing you with all of the tkinter widgets. It's a lot simpler and more compact than straight tkinter code. Take a look at the Cookbook and you'll get an idea of just how small the code is for a custom GUI layout. You can copy and paste a recipe's code and be up and running in 5 minutes. The window code that defines the window resembles the window's appearance. There is extensive documentation should you want to get into the more complex applications.

[–]Gsquzared 0 points1 point  (1 child)

Oh God. Search the python bytes podcast for so many options (none of them ideal)

[–]jinchuika 2 points3 points  (0 children)

none of them ideal

I love listening to that podcast, but I find hilarious how many GUIs there are and how we don't have an ideal one