Categories
Development

oci-bucket-gui in Python, Qt.

I don’t like giving up 🙂 And so I gave Qt another chance and installed the complete Qt Creator IDE from https://www.qt.io/product/development-tools. Most of it is targeted to C++ development and very little was done for Python – my idea is to continue using VSCode as code development editor and only use the Qt Designer from the Creator package for visual GUI development.

The Qt Designer that I’ve previously installed as a stand-alone application, wasn’t working well and my hope was that it’ll be better if I installed the whole QT Creator IDE thing.

And this indeed helped – no more docked window that resize spontaneously or others glitches, this is good news.

In VSCode, I’ve installed the “Qt for Python https://github.com/seanwu1105/vscode-qt-for-python that adds couple of nice features like ability to call QT Designer directly from the .ui file and to recognize PyQt and PySide file types.

What’s next? The next step is trying to create the GUI in the designer and then to start wiring the logic. More news to come 🙂

Keep hacking (•̀ᴗ•́)و ̑̑

Categories
Development

oci-bucket-gui in Python, cont.

What are the news? Not great 🙂

Advanced further a bit, these are the results:

  • GTK+ was running reasonably well on Linux and the development “inner cycle” is fast enough. Passing signals and data back and forth from GUI to code works well.
  • Glade GUI Editor is pretty unstable, crashes often as soon as you have slightly more complicated layouts.
  • However tried to make sens of it on Windows – oh the horrors! No native Windows wheels or binaries for PyGObject (main GTK parent class) is available that actually work, and building it from sources is incredibly difficult involving C++ toolchain and tons of prerequisites. Installing Glade on Windows involves too many tricks and requires MSYS2 tools and mingw64 emulator (and it isn’t more stable than on Linux). Cross-compiling and distributing to Windows from Linux is as artisanal as it gets, looks way too brittle.

Explored another multi platform GUI framework: Qt.

Qt, like GTK, is also developed in C++, so using it from Python requires bindings. The most popular seems the “Qt for Python” AKA “PySide2” or the very new (available since couple of weeks) “PySide6” from qt.io. It has its own IDE that is mostly targeted to C++ development but not so much to Python though. There is a GUI designer but so far it misbehaved rather badly for me (continually resizing dialogs to unusable sizes), also the layout and editing of widgets’ properties is weird, I find it unnatural. Not as good as Glade’s.

Maybe I should just switch to C++. Just kidding – no way!

It’s a good thing this is just a hobby project – I have possibility to burn time and not have a product yet 🙂

I’m unpleasantly surprised at the state of multi-platform GUI development today, it seems like all the brain power is spent on Web technologies, and the desktop GUI efforts are few and far between, you can’t just easily try it as a novice and “make it work” without tearing your hear off in the process.

Microsoft announced a new promising MAUI framework this year that evolves from Xamarin Forms: https://devblogs.microsoft.com/dotnet/introducing-net-multi-platform-app-ui/ but so far there is no preview SDK delivered. There is hope they will be able to deliver good developer experience as they always did. We’ll see, I’ll be certainly tracking this project.

In the meantime I’m thinking at what I’ll be doing next, so far not sure what that would be…

Keep hacking (•̀ᴗ•́)و ̑̑