Qt - Reddit
14 subscribers
279 photos
45 videos
4.21K links
News and discussion for the Qt Framework.

Subreddit: https://www.reddit.com/r/QtFramework

Powered by : @r_channels & @reddit2telegram
Download Telegram
and ported them over. I would continue to use the Qt5 version in my dental clinic such that if there is a major bug that needs to be fixed, I can fix it that the Qt5 repo. Yes, I could have just made a separate branch instead; it but since I was switching to cmake as well, all the file locations would be changed as well and it would have been too complicated to move files around each time.

So pretty good plan, right? Well, mistakes were made (which is why I am writing this).

First mistake is using a lot of “raw” strings. When I made the decision to go with Kirigami and KDE, the standard build flags include `QT_NO_CAST_FROM_ASCII`. This means `QString s = “hello”;` is no longer valid. You have to use `QString s = QStringLiteral(“hello”);`. Sadly, a lot of code not only used a lot of raw stings, but QVariantMap was used rather extensively because it maps to QML’s Javascript class types and I exploited that to share data between C++ and QML and of course I did a lot of `object[“attribute”] = value;` in my code; which had to be switched to `object[QStringLiteral(“attribute”]) = value;`. Now, could I have done something to flag to allow to cast strings from ASCII? Probably. I was more concerned that making it a KDE App it may make it difficult in the long run to have flags specific to my app for Craft to build it. There is also an unfortunate issue that if you were to use the standard KDE build flags; you would have to switch over to macros like `Q_SLOT` instead of `slots:` and `Q_EMIT` instead of `emit`. I’m just hoping this will be better in the long run.

Second mistake was using QML’s “Settings” type rather extensively. When it was released in Qt 5, it was technically a “lab” component which means it was still in an experimental stage. At the time, I thought it just meant small changes would be made. For Qt 6, they removed the `fileName` attribute and replaced it with the `location` attribute. However, it requires the protocol for the file location. For example, if you were using a fileName attribute, you had `/home/example/test.ini`, but now you have to make `file:///home/example/test.ini`. Not a huge problem but if you miss any of the replacements (since I set some of the attributes via code, not just declarations), you get a realtime error, not compile time. Therefore a fair amount of testing is needed just to make sure nothing was missed.

Third mistake was relying too much on X11 positioning. When using Windows / macOS, X11 in a multi-monitor setup, you have pretty much a giant “virtual” screen and setting the x or y position would allow you to set which screen the window would show up. For example, if you had 3 monitors, all of them 1920x1080, stacked vertically. You can make a window show up at the middle screen by setting the y position to be 1080 or the bottom screen by setting y to be 2160. Guess what you can’t do Wayland? Set the position of the window (at least, not as of right now). To make matters worse, setting the screen via QML is still broken. There is a crazy workaround but you can only fullscreen on a target screen. Eventually, I have to setup which screen / monitor is which location (patient side, wall, ceiling) for each operatory and then rely that configuration to know which screen it to full screen that video.

Sorry again for the big wall of text but believe it or not, there were even more things I could have added to this already long writeup.

https://redd.it/1sealvm
@qt_reddit
I'm looking for a framework to use for a fast desktop app, what should I use?

Is QT still a good thing to build desktop apps in 2026? Or are there some other faster alternatives? It's for a local AI project I plan to build

https://redd.it/1seraxd
@qt_reddit
Correct way to refresh as fast as possible?

I'm currently rendering externally into a QWidget in repaint event. I want to stress test gpu and thus make the widget refresh as fast as possible. What is the preferred way to do this? Calling update inside repaint or a timer of 0?

https://redd.it/1sew3ui
@qt_reddit
Qt-Designer margin headache.

GUI, PySide6, and Qt n00b here....

I'm wrestling with Qt Widgets Designer (qt-designer with PySide6)....

I can't get these margins to make sense.

https://preview.redd.it/yovbwyuvoutg1.png?width=305&format=png&auto=webp&s=1a07a145c1f43a3fbf92074638d620d50e91ff34

https://preview.redd.it/uif0l9uyoutg1.png?width=518&format=png&auto=webp&s=531ba1d2e2cbbbcd75b389c6b3cd8cfd492f3b82

https://preview.redd.it/eeuvur7nputg1.png?width=293&format=png&auto=webp&s=29f8c6ea96cc92d1967b35894622feb50360c02f

As you can see, the layoutLeftMargin and layoutRightMargin are identical at 9, but the "Part Number" GroupBox appears to have way more space on the left than the right! If I manually mess with the layoutLeftMargin to like 5 or 6, it looks much better.

Any idea how to resolve this issue? It also seems to persist in all of the preview options.

Thank you for your help!


https://redd.it/1sfc1tz
@qt_reddit
QPolygon occlusion

Hey, so I am posting this here since I've been struggling with this in the past 2 weeks.

For a school project, I am making a Doom-like game environment with BSP and rendering without any OpenGL or Qt3D. Although not exactly the same, it is still useful to learn all the concepts and develop the programming intuition. The problem is I've hit a roadblock. The renderer we made does not render in columns like Doom. Instead, we use QPolygons. Right now, we have a pretty good game we could submit and get our points, but it render back to front. I'd like to integrate front to back with occlusion but no matter what I've tried, it won't work properly. The closest I got was with QPainterPath, managing visible space with screen size, but even that was heavy on computing power and had some bugs. I'd really like some help on finding a solution to do this occlusion. As or right now, I use a universal version of BSP (Not the one in Doom with subsectors, more of the one like Wikipedia suggests), and QPolygons for rendering, with a few structure like Vertex, Sectors and Linedefs, if this can help. Haven't made the Visplane yet. Thanks a lot to anyone who want to help!

https://redd.it/1shdix7
@qt_reddit
QNativeInterface and Wayland window/surface?

This was announced in the blog post for when Qt version was something like 6.5, now it is 6.11, and there are no changes here; we still need private headers and calls?

https://redd.it/1sifdvx
@qt_reddit
Setting the background color of a spinbox

[ Windows 11, style=windows11 \]

I wanted to set the background color of a spinbox. I do not want to use style sheets, because style sheets interfere with Qt's automatic handling of dark mode.

OK, should be straightforward enough: set one of the roles on the spinbox's palette to the desired color.

But which role? After experimentation and reading the sources, the answer seems to be that if the widget's background role (which defaults to Window) is set in the palette, then it uses the Button role. (Huh?!?)

https://github.com/qt/qtbase/blob/d1f8ab0ef8801ee0d3f86e6c4cb7e293f08515c6/src/plugins/styles/modernwindows/qwindows11style.cpp#L3133

I suspect that this is just a bug. Comments indicate that it's derived from controlFillBrush, and that is straightforwardly "if Button is set, use Button". I suspect that in the copy-and-paste the test got updated to "if the background role is set...", but then the consequent got left as "use Button".

Does anybody know anything more, before I file a bug report?

https://redd.it/1sizpw4
@qt_reddit
Looking for Open Source Greentech/Environmental projects (Qt/C++ & Graphics focus)

Hi everyone, I’m looking to contribute to open-source projects in the Greentech/Climate-tech space.

I have an intermediate background in C++ and Qt/QML, and I’m coming from a Technical Art background (3D engines, shaders, performance optimization). I'm particularly interested in:

\- Digital Twins for industrial/environmental simulation.

\- High-performance data visualization (OpenGL/Vulkan integration in Qt).

\- Desktop applications for environmental monitoring or GIS.

If you know of any active repositories or organizations that could use help on the UI/Visualization side, please let me know! :D

https://redd.it/1sjapet
@qt_reddit
Built a study planner app in Qt/C++ – looking for suggestions and feedback

https://preview.redd.it/i9zkjg0pr1vg1.png?width=1112&format=png&auto=webp&s=ebb844e9b2daca38b678a4fc6bc34f581bab798d

I’m in my second semester of uni and working toward declaring computer engineering, and I built a study planner in Qt/C++ that I now use daily. It’s a lightweight desktop app with tasks, groups, messaging, and SQLite storage. I’d appreciate any suggestions on architecture, Qt best practices, or UI decisions.

https://github.com/salem-5/StudySync

https://redd.it/1skskdl
@qt_reddit
QML language server in pure Go - standalone LSP, no Qt Creator required

Hey all,

I've been frustrated that the only decent QML tooling has historically lived inside Qt Creator. Editors with LSP support either get nothing or a version of qmlls
that's painful to install outside the Qt toolchain.

So I wrote a standalone one:
https://github.com/cushycush/qml-language-server


It's a single static Go binary that speaks LSP over stdio. No CGO, no shared libs, no Qt install — just drop it in your PATH and point your editor at it. Under the
hood it uses a pure-Go tree-sitter runtime with the tree-sitter-qmljs grammar.


Features (v1.0.1):

\- Hover with documentation for QtQuick, QtQml, QtQuick.Controls, and QtQuick.Layouts types
\- Context-aware completion (types, properties, signal handlers, anchors, imports)
\- Go-to-definition and find-references across the workspace (not just the current file)
\- Diagnostics from parse errors
\- Rename, document symbols, signature help, inlay hints
\- Code actions for common quick-fixes

It also knows about Quickshell types if you happen to be building a desktop shell with QML, but that's a superset — the Qt/QtQuick coverage is the core.


What it isn't:
it's not a full QML type checker. It doesn't understand C++-backed custom types the way qmlls paired with a build does. If you're working on a big Qt
app with lots of
Q_PROPERTY
\-registered C++ classes, qmlls will still give you deeper results. But for editing QML files in VS Code or Neovim without booting Qt
Creator, this should cover most of what you want.

v1.0.1, so there will be rough edges. Bug reports and "it should know about X type/property" requests very welcome.

https://redd.it/1slusew
@qt_reddit
I built an MS Paint alternative for macOS

One thing that has always bothered me about macOS is that, unlike Windows, it doesn’t really come with a simple built-in paint app.

I don’t use tools like MS Paint every day, but I think they’re important because ideas disappear quickly. Sometimes you just need to open something instantly and sketch a thought before it’s gone.

I used to work around that by always carrying a notebook and pen. But I wanted that same low-friction experience on my computer too, something that feels as immediate as grabbing pen and paper while I’m already sitting at my desk.

So I built Vincent, a lightweight sketching app written in C++ with Qt. I chose Qt because I wanted a consistent experience across macOS and Linux, and because I wanted it to feel fast. Compared to Electron-style apps, it’s much lighter, and since the UI is very simple, it responds almost instantly.

https://preview.redd.it/q53nw9b0bbvg1.jpg?width=2880&format=pjpg&auto=webp&s=e6f631f825c4bff6a723536543289fac50f51bc6

It’s not trying to be a full-featured art program. The goal is just to make sketching and note-like drawing immediate and frictionless.

It’s normally $1.99 here:
https://iisacc.com/Store/Vincent

But I’m sharing a direct access link for a while to celebrate finishing it:
https://iisacc.com/Store/Vincent/VincentAccessKeyB8F4E1C79D2A6F53E0B7C1A49D8E2F6A

https://redd.it/1slzq2l
@qt_reddit
This media is not supported in your browser
VIEW IN TELEGRAM
Interactive collision shape editor in Qt (PySide6) with real-time physics

https://redd.it/1smek6q
@qt_reddit
LLMQore 0.3.1 — full MCP support for Qt/C++

First things first: renamed the library from LLMCore to LLMQore — because I googled my own lib and couldn't find it.

The main thing in this release is full MCP (Model Context Protocol) support. Server, client, stdio and Streamable HTTP. Connect any MCP server to your LLM client with a one-liner or a JSON config.

mcp-bridge example

chat with mcp tools example

MCP Bridge — a new standalone tool that makes it easy to connect Claude Desktop and other clients to MCP servers that don't use stdio. I ran into this myself and it was annoying — so I built a fix. Prebuilt binaries for Linux, macOS and Windows are in the release — download, run, done.

Improved demo chat — it now shows connected MCP servers and their tools. For example, you can install the Qt Creator MCP server via Extensions and try it right from the demo. A nice way to see how everything works together.

Give it a try — send your usage examples, we'll add them to the examples list. Bug reports are welcome too.

👉 Repo + binaries: github.com/Palm1r/llmqore

https://redd.it/1smjit1
@qt_reddit
Qt Quick 3D performance optimization - Free webinar (May, 6 and May, 11)

We are hosting a webinar with our Software Engineers Benjamin and Sakaria on optimizing 3D UIs for target hardware.

 

The webinar covers the decisions that most affect 3D performance in practice:

 

Performant meshes: Optimize with e.g., mesh density and the level of detail (LOD)

Performant materials: Balance your materials, shaders, etc., against performance

Scene environment: Limit the amount of light sources and balance between pre-calculation and real-time, including a volumetric lighting alternative, global illumination techniques, etc.

Antialiasing: Make mindful choices on using Super sampling vs. MSAA, FXAA, TAA, and Progressive AA

QML best practices: dos and don'ts

 

Register here:

https://www.qt.io/webinar-optimizing-3d-uis-for-high-performance-on-your-target-hardware

https://redd.it/1sn0hky
@qt_reddit
I created a C++/QML music learning app to learn QML
https://redd.it/1sn1oc1
@qt_reddit
PySide6 + Qt Design Studio QML on Raspberry Pi CM5 (aarch64) – missing QtQuick.Studio.* components (no PySide6-DS arm64 wheel)

**Quick Summary:**
PySide6 app with UI made in Qt Design Studio works great on desktop with PySide6-DS, but on Raspberry Pi CM5 (aarch64) the QtQuick.Studio.\* components are completely missing because there's no arm64 wheel. I fixed it by replacing them with plain QtQuick, but I'm looking for better long-term solutions.
for full explanation and if u are interested plz view below:

Hey r/QtFramework (and r/raspberry_pi),

I developed a PySide6 application where the entire UI was designed in **Qt Design Studio** (.ui.qml files).

On my desktop it runs perfectly:

* Wrapper .qml files import QtQuick.Studio.Components, QtQuick.Studio.Effects, etc.
* Loaded from Python using QQmlApplicationEngine.

On the **Raspberry Pi CM5** (official 64-bit Raspberry Pi OS):

* pip install PySide6 works fine.
* But **no PySide6-DS wheel for aarch64** → all Studio modules are unavailable.

**Current workaround:** Replaced Studio components with standard QtQuick / QtQuick.Controls equivalents (e.g. Studio.Rectangle → Rectangle, effects via Layer + shaders). App now runs correctly.

# Looking for better options:

1. Is manually rewriting the components the only realistic way, or is there something cleaner?
2. Has anyone tried / succeeded with:
* Cross-compiling just the qtquickdesigner-components module?
* Building a custom PySide6 wheel with full Design Studio support for aarch64?
* Switching to **Boot to Qt** for Raspberry Pi?
* Native build on the Pi or other distros (like Arch Linux ARM)?

**Extra details:**

* Target: Raspberry Pi CM5 + standard 64-bit Raspberry Pi OS
* App is performance-sensitive but not extremely heavy
* I want to keep using Qt Design Studio on the host if possible
* Cross-compilation environment is available

Has anyone successfully deployed a full Qt Design Studio → PySide6 project on CM4/CM5? What worked best for you?

Any guides, Docker setups, or build tips for the Designer components would be greatly appreciated!

Thanks!

https://redd.it/1sn1jc4
@qt_reddit
Built an open-source Qt6 / PySide6 bridge for OsmAnd offline maps
/r/gis/comments/1sn3hqq/built_an_opensource_qt6_pyside6_bridge_for_osmand/

https://redd.it/1sn49rx
@qt_reddit
Qt6 learning resources for beginners (MSYS2 + GCC)

Hi everyone,

I’m a beginner in Qt and I’ve just started learning it using MSYS2 with GCC.

At first, I’d like to learn things “the hard way” (coding the UI manually) so I can really understand how everything works under the hood. After that, I plan to move on to QML and Qt Designer.

I’d really appreciate any recommendations for good books or tutorials, especially focused on Qt6. If possible, resources that fit well with this learning approach would be great.

Thanks in advance!

https://redd.it/1sn8zw1
@qt_reddit
Is name Qt from initials of Quasar Technologies?

I saw the Qt timeline that the Qt project was started first and then it's creators Haavard Nord and Eirik Chambe-Eng registered the 1st company called Quasar Technologies, but is that what they had in mind when they started the project, Quasar Technologies, as a project and then they just used the initials Qt?

Does anyone know for sure?


https://redd.it/1snaicv
@qt_reddit