13 ms·
PyQt5 Tutorial: Create a Python GUI in 2018
- acidburnNSA 8y agoIn commercial settings, I wonder how hard it really is to package this up? I've been building/distributing fully cython'd installers for a while (to sort-of hide the source as well as make a convenient package)... I wonder if that would be harder with PyQt for some reason? "In the Python world, the process of turning source code into a self-contained executable is called freezing. Although there are many libraries that address this issue – such as PyInstaller, py2exe, cx_Freeze, bbfreze, py2app, ... – freezing PyQt apps has traditionally been a surprisingly hard problem. We will use a new library called fbs..." click to fbs... "You can use fbs for free in open source projects that are licensed under the GPL. If you don't want to open your code up to the public, you can purchase a commercial license for EUR 249 per developer" I'd happily pay the 250 euros but I somehow doubt fbs will also convert my code to C and compile it.
- toyg 8y agoI can't speak for fbs (never used it), but the way these things usually work (pyinstaller et al) is by compiling everything to .pyc or .pyd and/or pack it up with the python runtime in an executable. It's probably not too hard to extract the original source, but it would be enough to deter a casual observer. The problems with packaging PyQt usually boil down to module discovery, because the import machinery is leveraged by the wrapper in nontrivial ways. PyInstaller has been ok for me recently, whereas cx_freeze was unpredictable across minor versions.
- acidburnNSA 8y agoOk, thanks for the info! Yeah the pyinstaller, etc. experiences I've had were trivial to decompile from pyc back to py so for "hide the source" we found that Cython takes it to the next level. I wonder what fbs does in this case that handles the PyQt import stuff so well.
- toyg 8y agoI expect it's a lot of special-casing you can do if you expect Qt to be in the mix. Do you use any particular lib for your cythonization, or is it all custom ?
- sametmax 8y agohttp://nuitka.net/ http://nuitka.net/ is what you are looking for. It's robust, proven, does work well with C extensions (including numpy and QT) and produces stand alone binaries. You can produce binaries for Windows, Linux and Mac (but not cross compile). It works by turning the whole Python code into C before compiling the result. The additional benefit of that is that you gain a bit of execution speed. The project is amazingly little known in the community while PyInstaller, py2exe, cx_Freeze, bbfreze, py2app are: nuikta works better, handle more edge cases, target more OSes and support recent versions of Python. The best way to be convinced is to read the last entry of the blog on the home page: the guy is meticulous with this project.
- etaioinshrdlu 8y agoWell, on my last project, I found PyInstaller to work best and Nuitka changed too many things about the environment. PyInstaller felt quite close to an auto-unzipping python interpreter and your code, simple.
- chaz6 8y agoJust to note, there are official [1] Python bindings available for Qt and this can usually be installed with `pip install pyside2`. [1] https://www.qt.io/qt-for-python https://www.qt.io/qt-for-python
- cpburns2009 8y agoPySide2 is now out of beta?
- deleted 8y ago[deleted]
- macco 8y agoYes, it's called "Qt for Python" now
- yorwba 8y agoIt's still just a "technical preview", but I've been using it for a while and didn't have any problems that weren't caused by me not knowing how Qt works. Some of the examples in the documentation are still in C++, but it's pretty easy to translate them to Python since the names are the same. (Sometimes painfully so, e.g PySide2.QtCore.Qt.ScrollBarPolicy.ScrollBarAlwaysOff.)
- sleavey 8y agoAgreed. I dabbled with Pyside2 recently and it was refreshingly well structured compared to PyQt4, which is what I last used when I built a GUI a few years ago. It looks like the community might finally get behind one, good, open library for Qt5.
- toyg 8y ago> Some of the examples in the documentation are still in C++ If you do anything serious with Qt you'll have to read those anyway, I believe even PyQt stopped "translating" the docs to python. It's easy enough anyway, even for people like me with no real experience of C++.
- gandreani 8y agoThanks for sharing this! I'm close (hopefully) to finishing an app using PyQt5 and the fbs library will be super helpful :)
- mherrmann 8y agoCool! Let me know if I can help :-)
- Sileni 8y agoI like the tutorial, but I don't know why you would use PyQt these days. Tkinter is more permissive and has wrappers like appJar which make it disgustingly easy to put together a quick, ugly GUI. If you're building a desktop app that needs to really look good and be fast, why are you using Python?
- HoppyHaus 8y agoI've only been a Python dev, and have ended up becoming entrenched in Tkinter. I want to be able to just use another GUI framework for when I finally switch to something else. So, I can see the use.
- deleted 8y ago[deleted]
- tudelo 8y agoWhat would you use for an app that needs to look really good and be fast?
- Longhanks 8y agoReally good? Platform-native APIs.
- deleted 8y ago[deleted]
- clear_dg 8y agoQt qualifies then, at least on Linux.
- solarkraft 8y agoQt qualifies on any platform, imo.
- barking 8y agoAs someone who works with Windows forms, I'm wondering where the visual designer to place widgets is.
- basic1 8y agoQt Designer
- candiodari 8y agoIt's called Qt designer: https://youtu.be/Dmo8eZG5I2w https://youtu.be/Dmo8eZG5I2w
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]
- toyg 8y agoIf you use the complete Qt installer, you get QtDesigner. If you use the PyQT-provided wheels and/or you don'want to mess with the whole Qt, then you can separately install QtCreator, which is very simple and embeds QtDesigner.
- AnIdiotOnTheNet 8y agoLooking at a tutorial, it looks like all it does is layout the form for you. That's a shame. Things closer to what the original VB was are sorely missed in modern computing.
- rkeene2 8y agoHere you go: vTcl -- just like Visual Basic 3.0. Also, you get to use Tcl instead of Visual Basic, so even better ! http://vtcl.sourceforge.net/ http://vtcl.sourceforge.net/
- 8y ago
- DanFeldman 8y agoWe use Qt heavily at Starsky Robotics. We initially used it because it has tight integration with ROS via RQT [1], but I'm pretty impressed with the framework in general. Lots of great tools out of the box, QtCreator is awesome and once you get the right signal/slot model in your head everything is a breeze. Plus getting to prototyping in python is always fast! For our use case, relative speed of the GUI isn't a factor. We've considered moving to electron just for ease of development, but python is winning out. [1] http://wiki.ros.org/rqt http://wiki.ros.org/rqt
- morenoh149 8y agoWhat's the memory consumption of pyQT compared to electron apps?
- toyg 8y agoAn order of magnitude lower. I see 40Mb on macos right now for a simple app.
- megous 8y agoI see a simple electron app using 140MB total. Measured by running 'free -m' before and after starting the app and waiting a while for a gc to run. Measuring memory use is difficult.
- TheAceOfHearts 8y agoFYI, you can open dev tools in electron and manually trigger GC [0]. [0] https://i.imgur.com/JbWArmR.png https://i.imgur.com/JbWArmR.png
- megous 8y agoI'm sure opending dev tools will increase memory use significantly though. So it's a bit self-defeating. :) Perhaps there's some API to call instead.
- dev_dull 8y agoI gave up on QT and decided instead to invest time learning javascript frameworks, which provide a lot more flexibility for creating apps.
- int_19h 8y agoFlexibility to do what, though? I'm genuinely curious: what doesn't Qt offer that a desktop app might need?
- christophclarke 8y agoI assume learning to build interfaces in Javascript allows you to port that skill to both the desktop environment (via something like Electron) or web environment through a browser.
- dev_dull 8y agoExactly this. Javascript frameworks allow overlap. I'm using the same tools and language to create a UI. Don't get me wrong I like QT apps and still tinker with them periodically. I will probably use them more once Go finds a way to make truly portable UI applications.
- radix07 8y agoI guess that's cool if you mostly do web stuff. But there are tons of developers that use Python/C++ for embedded systems, OS, data science and other things that could make the same argument for Qt.
- simion314 8y agoIf only there would be a standard way of doing GUIs in HTML, but if you give the same GUI to be implemented to 10 Web developers you will get really different code, some would write it in HTML and CSS, other would maybe use angular, others would use react or similar, or if the project uses other backend language/frakework you will get different results depending on what PHP,Ruby,.NET,Java framework was used. In Qt you use the Designer, you need to learn about the layout system if you want to do good UIs, but your GUI is saved in a file and then the c++/python code implements the event handlers and app logic.
- kelvin0 8y agoI've been using wxPython for many years, and it works very well. What are the advantages of PyQT over wxPython? Anyone experienced both 'worlds' in a non-trivial application?
- mherrmann 8y agoThe reason why I chose PyQt over wxPython was the former's support for custom styles. I wrote an article with my thoughts on picking a GUI framework [1], in case you're interested. 1: https://fman.io/blog/picking-technologies-for-a-desktop-app-in-2016/ https://fman.io/blog/picking-technologies-for-a-desktop-app-...
- solarkraft 8y agoI am super happy that you seem so dedicated to providing a good UI library in an attempt to keep people off of Electron (I find one of the biggest hurdles to be the ease of getting started/iteration speed). Dumb question time: Is this also usable with QML?
- Siecje 8y agoYou can use PyQt5 with QML here is a simple application https://github.com/siecje/qml-testing https://github.com/siecje/qml-testing
- kbumsik 8y ago1. wxPython has inconsistent looks and layouts between platforms and monitor resolutions (or DPI). For example, on PlayOnLinux GUI app I cannot click an "OK" button while using Surface Pro because the button is hidden outside of the window. 2. QML is an amazing language. It is modern, declarative and reactive but still very simple to use. Personally I don't want to go back to the traditional GUI coding styles after experienced QML. 3. Qt Designer is a great GUI tool that you can quickly prototype a GUI app. 4. Qt has the best documentation among cross-platform GUI frameworks. 5. Qt is a much bigger framework having more features. For example, you can easily embed WebKit or Chromium very easily.
- quotemstr 8y agoI've been using a lot of Python GTK via gobject introspection lately. It works fine, or at least a well as GTK ever works. Why would I want to switch to Qt? 1) I like how GTK and Python object lifetime tracking are compatible (both are simply reference counted), where as Qt has this hierarchical model that feels weird in Python and that led to random segfaults when I tried using PyQt for a serious project last year. 2) gobject introspection works with a variety of different bindings and libraries and provides an object model extensible in any language. Last time I looked at Qt bindings, they looked more like pre-gobject-introspection Python GTK bindings, meaning they were fixed-function and frequently left out some functionality. With gobject, all language bindings are first-class citizens.
- rapsey 8y ago> Why would I want to switch to Qt? Because GTK is awful outside of Linux.
- quotemstr 8y agoIs it? Why? Works fine for me.
- rhodysurf 8y agoFunctionaly it is fine, but its sure doesnt look native on Mac OS or Windows. Qt looks at least a magnitude better (more native) on those platforms
- cpburns2009 8y agoI'd argue GTK is awful inside of Linux because of client-side decorations (removal of the standard title-bar) that you cannot disable, removal of the menu bar, and the mobile/tablet first design (some people do use desktops and I'm not allergic to text).
- deleted 8y ago[deleted]
- lalos 8y agoAnybody know if it's easy to reverse engineer or strip parts of the application when deploying PyQt5 apps? Or do you need extra measures to obfuscate the code to protect certain logic?
- mherrmann 8y agoI've never tried it but given Python's interpreted nature, it is likely pretty easy unless you use an obfuscator. Note that that's true for Java .class files as well. I was really surprised once when I tried to decompile one of my own that I had thought would be safe. You get near-perfect accuracy.
- pjmlp 8y agoAnd native code as well. https://www.hopperapp.com https://www.hopperapp.com https://www.hex-rays.com/products/ida/ https://www.hex-rays.com/products/ida/
- fabioz 8y agoYeap, it's pretty easy (see: https://github.com/rocky/python-uncompyle6 https://github.com/rocky/python-uncompyle6), although note that if you're worried about decompiling, instead of using an obfuscator, using something as Cython or Nuitka to compile your code should not be difficult -- and as a plus your code becomes faster too ;)
- xmcp123 8y agoThis is especially true for Android apk's broken down into .smali files. They can be decompiled and recompiled with ease. Part of my job used to be the large scale modification and recompilation of Android apps....you'd be amazed how many passwords are floating around in those.
- Severian 8y agoIf you build the python ecosystem yourself and supply a custom binary, you could probably obfuscate a bit by modifying the compiled bytecode values. Supply only .pyc and maybe modify or not supply the dis module. Here's a resource that may help: https://devguide.python.org/compiler/#introducing-new-bytecode https://devguide.python.org/compiler/#introducing-new-byteco...
- minimaxir 8y agoThis is a case where the "in 2018" in the title is very helpful, as Googling information about Python and Qt usually returns something dreadfully out of date. (and as other comments note, there are lots of new companion tools/competitors like Electron)
- ehsankia 8y agoThe API still looks messy and unpythonic though, sadly. Look at the basic hello world example. Why do I need to pass QApplication an empty array? Why am I calling a method ending with _ to launch the program? And the fact the label magically attaches to the app through some side effect is also confusing. Does anyone know if there's any good shim/wrapper around PyQt that has a better API?
- blattimwind 8y agoSince Python 3 you can use exec() instead of exec_() (in Python 2 exec was a keyword). > And the fact the label magically attaches to the app through some side effect is also confusing. Are you referring to the first "label.show()" example? Typically that pattern is rare (~once per app for the main window). Regarding attachment to the app; QApplication is a process-wide singleton. All objects belong to the same app.
- ehsankia 8y agoThank you for the explanation, and the keyword issue makes sense.
- simion314 8y agoThe confusion will go away if you learn how things work under the hood(you should know what an event loop is, learn about Qt widgets parenting, signals and slots, layouts),also in practice you use the GUI tools to create and modify GUIs though you need to learn how to use them properly and not create absolute positioned layouts.
- wiz21c 8y agoMaybe it's not pythonic but I can assure you, after having passed 6 years working with it that it's extremely efficient and very well integrated with python. It just works, and a complaint about aesthetics won't change that :-)
- toyg 8y agoI'm using PyQt for a project right now, and overall it's a nice feeling as always. The model/view classes are great, once you get the hang of them. There are a lot of utilities for things like persistence and threading (but I wouldn't cross the streams with python threads), and it's all crossplatform and very mature by now, the only issues are usually around packaging. QML is also very powerful, but I'm usually happy with Designer -- I guess I'm old-school. If you need some help with PyQt development, call me up, I'm cheap ;)
- blattimwind 8y ago> (but I wouldn't cross the streams with python threads) You can't. Also keep in mind that Python's thread-local storage only works with the threading module threads, not Python threads created elsewhere (e.g. by the "outer" C++ application itself or by a QThread wrapper). It's really quite poorly implemented there IMHO.
- krferriter 8y agoThe "threading" functionality in Python is a significant downside to the language. I don't know why they went with the idea that people don't need real threads like they can get in C/C++, Java, C#.
- blattimwind 8y agoPython threads are real (operating system) threads. Note that the "threading" and "_threading" modules wrap thread creation and otherwise just use interpreter C APIs. Their design flaw is that they assume that they are the only ones using the interpreter API.
- detaro 8y agoI assume parent is referring to the GIL, which limits the performance benefits you get from threads.
- 8y ago
- kodablah 8y agoI wish all the effort to make Qt available in Python was going in to exposing a C API. I of course know this is difficult due to Qt relying on OO extensibility in many cases and I am aware of many efforts in many languages that just use the C++ API directly by essentially building their own C API layer. That I have to choose between C++ or Python makes it very difficult for many use cases in other languages. What essentially ends up happening is you create the UI in C++ then build a communication/bridge layer with your Go/Rust/JVM/etc app via C and the respective language's FFI features.
- pknopf 8y agoI built a C-layer myself for use with C#. https://github.com/qmlnet/qmlnet https://github.com/qmlnet/qmlnet It worked out nicely.
- rhodysurf 8y agoYou can use rust https://github.com/KDE/rust-qt-binding-generator https://github.com/KDE/rust-qt-binding-generator There are Go bindings floating around too
- kodablah 8y agoSure, I am familiar with them all (there's another decent Rust cpp gen one too). That's what I was alluding to with "I am aware of many efforts in many languages that just use the C++ API directly by essentially building their own C API layer." Unfortunately each binding has to do this themselves because there's not a blessed C API.
- pknopf 8y agoI'd like to take this time to introduce a project I have been working on. I'm using it in production currently. https://github.com/qmlnet/qmlnet https://github.com/qmlnet/qmlnet It is a perfect balance between QML and .NET. The tech stack splits along the perfect line. QML for UI, .NET for business logic. I'd be glad to answer any questions.
- raphinou 8y agoDo you know if it is working fine with F#? Will possibly try it as I learn F# (on Linux).
- pknopf 8y agoIt does. Any .NET language.
- oblio 8y agoHow do things work regarding the boundary between .NET and Qt memory management? What was the hardest problem you faced regarding this issue (resource leaks, etc.)?
- _eht 8y agoIs there a GoQt5 being worked on anywhere?
- cristoperb 8y agoI found two Go bindings for Qt: https://github.com/kitech/qt.go https://github.com/kitech/qt.go https://github.com/therecipe/qt https://github.com/therecipe/qt Both seem to be in active development. Does anybody have experience with either?
- 21 8y agoSteve Yegge was a true visionary. In 2004 he predicted the massive popularity of (future) Electron: > web application programming is gradually going to become the most important client-side programming out there. I think it will mostly obsolete all other client-side toolkits: GTK, Java Swing/SWT, Qt, and of course all the platform-specific ones like Cocoa and Win32/MFC https://danluu.com/yegge-predictions/ https://danluu.com/yegge-predictions/
- deleted 8y ago[deleted]
- toyg 8y agoI raise you a Joel Spolski, 5 months earlier: https://www.joelonsoftware.com/2004/06/13/how-microsoft-lost-the-api-war/ https://www.joelonsoftware.com/2004/06/13/how-microsoft-lost... “The new API is HTML, and the new winners in the application development marketplace will be the people who can make HTML sing.”
- cjauvin 8y agoI'm sometimes considering porting the UI of a relatively complex management app I wrote sometime ago for a small company, from Ext JS to a Python-flavored traditional GUI framework like PyQt (it would essentially become a desktop app powered by an already Python-based backend, which wouldn't be really a problem deployment-wise, as it's an internal-facing app). I think there would be some benefits, but what stops me is a relatively concrete consideration: the primary UI widget on which my app relies are complex data grids, which must support a lot of functionalities (sorting, filtering, etc; which is an area where Ext JS clearly shines), and I'm wondering which framework would offer the best support (in terms of both functionalities and abstractions) for this kind of needs. Any ideas about this?
- gusmd 8y agoYou can do all those (sorting, filtering, etc) in Qt as well using the Model/View components. There is a bit of a learning curve to understand the "Qt way of doing MVC", but after that it works fine. At work we use Qt5 with both C++ and Python (through PyQt) and I love it.
- cjauvin 8y agoThanks! What I'd like to know more specifically is if there are some ready-made components already packing a lot of these functionalities without needing too much custom logic, or you need to roll out your own from low-level ones?
- blattimwind 8y agoQTableView supports pretty much everything. Model proxies like QSortFilterProxyModel give sorting and filtering on models not supporting it natively (at a performance cost, i.e. keeping sorting columns in memory). The model/view components scale to ~infty items, if the model is correctly implemented. They also support lazy loading.
- wiz21c 8y agoyep, Qt (Pyside) is very mature and very stable. In a professional, long term context, it's totally decisive.
- ausjke 8y agoStill using tkinter here which is python's default GUI, what's the license for PyQt5? For me learning Qt in general is another big investment of limited time, so far I have been using tkinter with python and it works well.
- blattimwind 8y agoPyQt5 is GPL; PySide2 is LGPL. Do note that the PyQt5 authors (Riverbank Computing) have made it explicit that their view of GPL linking (a matter of debate in some circles) is that you can use PyQt5 from MIT/BSD/... applications.
- sevensor 8y agoPyQt5 is dual licensed GPL / commercial. I.e. free if your work is GPL, pay if your work is proprietary.
- nofunsir 8y agoI use this as a reference: https://github.com/baoboa/pyqt5/tree/master/examples https://github.com/baoboa/pyqt5/tree/master/examples
- toyg 8y agoPyQt is GPL or commercial. Pyside/"Qt for Python" is LGPL. You then need a license for QT, which is LGPL or commercial. You can use the LGPL version of Qt with commercial PyQt, but I never understood the hoops you might have to jump through in order to comply with the LGPL. Packaging python apps is painful enough without having to worry about that, might as well spend a little to avoid the aggravation. LGPL Qt also lacks a few advanced packages.
- nofunsir 8y agoPyQt5 is really great. I wish I could convince some of my co-workers at SNC to use it instead of random solutions ranging from a full-blown WPF app, hand-rolled win32, heavily customized imgui, vt100 over telnet (apologies on behalf of *), to... 5000 lines of AutoIT for a simple gui... smh. I mean we already use python for some build steps. They seem to not be able to get over the python stigma, which I don't think needs to exist, or the pythonic paradigm "breaks their brains."
- saltycraig 8y agoI was interested in trying out fbs as I've always had many problems trying to get an executable build for Windows. I tried the simplest example he shows, but after running 'freeze' command I get a LookupError saying it can't find msvcr110.dll. Some investigation later, I install said dll from microsoft, and try again. It builds to exe now, so I go into the build folder and try to run it and just get a crash dialog.
- jcelerier 8y ago> If you use the Windows style instead, then it looks as follows: note that this theme is generally not used anymore, being superseded by the WindowsVista one which uses native theming info from windows to render the widgets.
- Upper_0nion 8y agoToo bad it's only for Python3 and installing both 2 and 3 is complicated. Would be a good program if it supported python2.
- voltagex_ 8y agoWhat issues are you having? Installing 2 and 3 side by side on most platforms is trivial.
- dagw 8y agoThere are several tools that make having both python 2 and 3 running trivial. Pipenv and conda are probably the two better ones. On the whole you should probably using one of them even if all your development is done with the same python version
- anentropic 8y agopyenv pipenv is dependency management on top of that
- yellowapple 8y agoI recently went through almost the exact same exercise (use PyQt5 to write a desktop program that would wrap our warehouse management system's web interface with QtWebKit and - upon receiving a specific download - call out to the REST API for a separate shipping system to book a shipment and print the shipping label). I was developing on Linux (I use Slackware day-to-day), but the pack stations at our warehouses run Windows 10, so it needed to be cross-platform. The Linux side was surprisingly painless, but getting the Windows side going was a nightmare; none of the traditional options for creating a standalone Windows executable actually worked, and I ended up resorting to installing MSYS2 on every machine, then packaging the app for MSYS2 (and pulling in all of Qt5 as a dependency, meaning that it takes up multiple gigabytes of space for what should be a pretty simple desktop app). I didn't know about fbs. I'm gonna try it out tonight. The fact that it seems to require resulting apps to be under the GPL is unfortunate, but that's already the case for PyQt5, so whatever.
- rryan 8y agoI would kind of expect that "in 2018" we'd be using QML and not QtWidgets?
- ensiferum 8y agoQML is declarative is fine for very simple UIs only. Once you need to start writing any amount of UI logic it gets inconvenient. If you need simply but flashy -> QML, if you need not so flashy but more functional and "standard desktop UI" -> QtWidgets
- superbatfish 8y agoFWIW, conda is an easy way to get PyQt, too.
- sandGorgon 8y agoThe hardest problem in this space is not writing the code, but packaging the app. All the freeze utilities have their quirks which ensure no one solution works for all three OS consistently. Even Dropbox had to rewrite their packaging to ensure maximum system compatibility (https://news.ycombinator.com/item?id=18067784 https://news.ycombinator.com/item?id=18067784)
- voltagex_ 8y agohttps://github.com/pybee/briefcase https://github.com/pybee/briefcase looks promising.
- mherrmann 8y agoI created https://build-system.fman.io https://build-system.fman.io to help with this exact (general) problem.
- sandGorgon 8y agowhoa... this is so cool. And its based on QT. What do you think of the Dropbox article ?
- mherrmann 8y agoI wish fbs had already existed when Drew Houston started Dropbox ;)
- deleted 8y ago[deleted]
- throwwwafgk 8y agoAlso see PyOtherSide, a QML plugin that gives asynchronous access to a Python3 interpreter. It let's you use the Qt deployment tools and deploy it like any other Qt app. https://thp.io/2011/pyotherside/ https://thp.io/2011/pyotherside/
- sytelus 8y agoHow is the experience of other folks here? I have found QT as true nightmare. The UX created with QT just doesn’t scale with 4K displays and framework is just pain to maintain on OS like Windows. I rather prefer UX frameworks that uses web technologies any day.
- tlamponi 8y agoI run Linux without desktop environment on a 4K screen, so I ran into this stuff on all GUI kits. I set the respective scale detection/factor variable in my environment and be done, e.g., for QT5 it'd be: export QT_AUTO_SCREEN_SCALE_FACTOR=1 for auto scaling. See: https://blog.qt.io/blog/2016/01/26/high-dpi-support-in-qt-5-6/ https://blog.qt.io/blog/2016/01/26/high-dpi-support-in-qt-5-... and https://wiki.archlinux.org/index.php/HiDPI#Qt_5 https://wiki.archlinux.org/index.php/HiDPI#Qt_5 for more options and other UI kits. Normally, the desktop environment should do this for you, though. But yeah, this was quite horrible for me for a long time and only got better recently (~ 1 to 2 years), with an wider adoption of high DPI screens, I'd guess.
- paulcarroty 8y agoWhy aren't more desktop apps written with Qt? https://softwareengineering.stackexchange.com/questions/88685/why-arent-more-desktop-apps-written-with-qt https://softwareengineering.stackexchange.com/questions/8868...