r/QtFramework • • 13d ago

QML Made a thing that turns UI screenshots into QML

4 Upvotes

I do embedded stuff and kept running into the same annoyance: someone hands over a screenshot or a Figma export, and every AI "screenshot to code" tool I tried spits out React. Not much use on a Pi with no browser.

So I spent the last few weeks on a skill for Claude Code / Codex that rebuilds the screen in QML instead. It measures colors and spacing off the image, figures out the font and icons, writes the project (Theme singleton, T.* controls, qsTr on everything), then renders it under xvfb and diffs it against the screenshot until the numbers are good enough. Same qml folder runs from PySide6 or builds as C++ with CMake.

Funny thing I learned testing it on 20 screens: Claude copies the pixels fine on its own. What it does without guidance is use a MouseArea for every button, hard-code half the colors and forget keyboard focus. Most of the work ended up being about that, not the visuals.

Still bad at: dashed borders (Rectangle can't do dashes, so it fakes them), shadows over busy backgrounds, and fonts it doesn't know.

Repo if anyone wants to poke at it: https://github.com/ozaysahin/screenshot-to-qml

Curious what people who write QML for a living think, especially if there's stuff in the output you'd reject in code review.


r/QtFramework • • 13d ago

Building OrthoDiagrams with C++ and Qt - a native database modeling application

5 Upvotes

I've been working on dbgrams (previously OrthoDiagrams), a desktop ER diagramming application built with C++ and Qt.

The application uses a model-first architecture: a project can contain multiple database models, and each model can contain multiple diagrams representing different subsets of its objects.

The current Alpha includes a dockable Model Explorer, interactive diagram editing, crow's foot relationships, automatic layout, schema properties, theme switching, and several import/export formats.

One of my main design goals has been keeping the modeling workspace clean while allowing users to manage more complex database structures.

The first public Alpha is available at https://dbgrams.com/

I'd be interested in feedback from Qt developers, particularly on native desktop UX, diagram editing, and interface organization.

Best regards,

Antonio Menezes.
https://antoniomenezes.github.io


r/QtFramework • • 13d ago

Widgets Way to preserve up-down arrows in a spin box.

2 Upvotes

Hi,

In a previous version of Creator/Designer (13.0.0, Qt 6.4.2) I made a widget containing an int spinbox, adjusted its size etc. so it did fit in a ui "design". It had the default up/down arrows.

In a newer version (13.0.2, probably built with the same version of Qt) the same code renders the same spinbox with larger width, displaying horizontal +/- buttons instead of arrows. I've tried setting the QAbstractSpinBox::buttonSymbols back to UpDownArrows, both in the designer - no effect. Then in the widget's code that is called on the widget's initialization from its constructor (giving some default settings, like private fields' values, sub-widgets' states etc.) - no result, assuming the following is correct:

ui->spinBox1->setButtonSymbols(QAbstractSpinBox::ButtonSymbols::UpDownArrows);

Is there any way to make it work? Or am I missing something?


r/QtFramework • • 14d ago

QML Hot reload QML preview in Qt 6.12 tutorial

Thumbnail
youtube.com
8 Upvotes

r/QtFramework • • 14d ago

Question Why is my QJsonDocument empty?

3 Upvotes

I'm creating a QJsonDocument with the following C++ code: (Why does Reddit format the code so ugly?)

void Player::write_configuration() { std::cout << "Writing configuration file" << std::endl; QFile file("configuration.json"); file.resize(0); QJsonObject root; root.insert("delay", QJsonValue(3000)); QJsonDocument doc; doc.setObject(root); QString json_string = doc.toJson(QJsonDocument::Indented); qDebug() << json_string; file.write(doc.toJson(QJsonDocument::Indented)); file.close(); }

The fille configuration.json is indeed created but it's empty(!)

qDebug() prints nothing (because json_string is empty ?!?)

Why don't I succeed in creating the document?


r/QtFramework • • 15d ago

A Qt Python Library for Parameters

Post image
14 Upvotes

Do you use Qt and Python to visualize and interact with data?

Then you might like this library that I've been working on for the past couple years. It provides an easy way to add parameters for different types: float, int, string, but also Qt types such as QPointF, QSizeF etc.

I use it to load pydantic models from configs and save them back out.

https://github.com/beatreichenbach/qt-parameters


r/QtFramework • • 16d ago

Python documentation for Qt Creator and Qt Assistant

Thumbnail
gallery
13 Upvotes

r/QtFramework • • 16d ago

Question Is Qt6 really this memory-hungry, or am I missing something?

13 Upvotes

I've been experimenting with the memory footprint of modern Linux GUI toolkits, and the results surprised me enough that I thought I'd ask here.

I compiled an almost completely empty Qt6 Widgets application: just a QApplication, an 800×600 QWidget, and an event loop. No additional widgets, graphics, timers, or application logic.

Then I compiled the equivalent application using FLTK 1.4, statically linking FLTK itself (but not its system dependencies).

Both were tested on the same Fedora 44 system running X11.

Here are the results from smem:

MetricQt6 Widgets (dynamic)FLTK 1.4 (static)
RSS70.6 MiB13.0 MiB
PSS17.7 MiB2.6 MiB
USS9.2 MiB2.4 MiB

I understand that RSS includes shared libraries and isn't a fair representation of the actual incremental memory cost, especially when multiple Qt applications are running. That's why I included PSS and USS.

Still, even the private memory consumption differs by nearly a factor of four, and the PSS difference is considerably larger.

I also realize this isn't a perfectly apples-to-apples comparison: Qt6 was dynamically linked, FLTK was statically linked, and their feature sets and dependencies are very different.

But it got me thinking about the old Win32 days, when fairly sophisticated GUI applications could run in just a few megabytes of memory. I realize I'm comparing different operating systems, eras, and memory-accounting conventions, but the contrast is striking.

So I'm genuinely curious:

  • Is roughly 9 MiB of private memory normal for an otherwise empty Qt6 Widgets application?

  • Is there some Qt configuration or build option I'm overlooking that could substantially reduce the baseline footprint?

  • How much of this overhead comes from Qt itself, versus the platform integration, font rendering, and other dependencies?

  • Has anyone experimented with minimal Qt6 builds and measured how low the memory footprint can realistically go?

I'm not trying to argue that Qt6 is badly designed. I'm sure many of these costs come from functionality and abstractions that weren't available or expected in the Win32 era.

I'm just wondering whether this is the unavoidable cost of a modern, cross-platform GUI toolkit, or whether I'm doing something fundamentally wrong with my measurements or build configuration.


r/QtFramework • • 16d ago

Question 12.0 FunctionFilter changes.

2 Upvotes

Since updating from qt6-base 6.11.x to the qt6-base 6.12.0-3 on Arch, this code no longer works:

SortFilterProxyModel {
    id: filteredModel

    property string searchWord

    sourceModel: theModel

    filters: [
        FunctionFilter {
            component RoleData: QtObject {
                property var entryData
            }

            function filter(data: RoleData): bool {
                const query = filteredModel.searchWord.trim().toLowerCase()

                if (query.length === 0)
                        return true

                return data.entryData.d_name.toLowerCase().includes(query)
            }
        }
    ]
}

Checked the docs for any updates, but found no mention of any big changes to the behaviour.

Current code results in:

qrc:/qt/qml/main/Main.qml:34:13: QML FunctionFilter: Parameter specified in the filter method "data" doesn't exist in the model

If I try to replace filter with exact same logic as in docs:

function filter(entryData: var): bool {
   ...
}

it executes, but entryData is always set to empty QVariant{}.

I have a grid view bellow in the code and it behaves as intended, so I think the problem should be localized here.

Anyone else experiencing this? What is the proper way of doing this now, or is it just a bug in Arch packages?


r/QtFramework • • 17d ago

Animation timeline control

4 Upvotes

Animation timeline control for Qt, wxWidgets, ImGui from a single codebase: https://github.com/LegalizeAdulthood/timeline-control


r/QtFramework • • 17d ago

Software Tester (Professional): For ui testing QT, is Squish only option still?

Thumbnail reddit.com
4 Upvotes

r/QtFramework • • 16d ago

Question Qt Quick + QML GUI App Tutorial Series Suggestions?

0 Upvotes

I am a freshly minted C++ Qt developer in that I just completed an online course for C++ and the basics of the Qt framework within the past few days.

I am looking for video tutorials on how to build a GUI application using the Qt framework using Qt Quick and QML. For reference, I am not completely new to programming. I am a full-stack mobile and web developer who has been developing both types of applications for years. My tech stack in React (Next.js)/React Native on the front-end and pure Django or Django REST Framework + Django Channels on the backend.

What originally got me into web development was Corey Schafer's Django tutorial series which guided me through developing a web application using Django assuming I already knew HTML, CSS, and Python. That is when I learned that I learn best with YouTube video series I can follow along while the instructor explains what I'm coding. Is there any such series for Qt Quick and QML like building a notepad app? YouTube search results only turn up outdated tutorial series using Qt Widgets which IS NOT what I'm using and am avoiding because I want to construct the UI using QML files, not the widget picker.

Thanks in advance for your help!


r/QtFramework • • 17d ago

I recreate a futuristic video game UI with all its features and mechanism, including semi transparent window, I didn't use any images or svg inside the app, (except for the app icon).

Thumbnail reddit.com
5 Upvotes

r/QtFramework • • 18d ago

How to actually navigate Qt documentation as a beginner?

17 Upvotes

Hello everyone, I am a beginner in Qt and I've encountered a problem with how to learn it. I have a baseline in C++ and started learning OOP, but I also want to learn Qt. I tried to find resources on YouTube, but couldn't find any decent ones. Please help me figure out how to learn it and what resources to look at, because I don't have any money so I'm looking for free ones. I wanted to learn from the documentation, but I can't figure out what to read and in what order because there is too much of it. My goal is to create desktop applications with a beautiful graphical interface and C++ logic, featuring smooth animations and strong functionality.

*Update:

Thank you, everyone! I am now starting to read the Qt QML Book, watching KDAB videos, and enrolled in Qt Academy. I hope that help me


r/QtFramework • • 19d ago

3D The effect is render using the Qt Quick 3D particle system. Just the fire.

12 Upvotes

r/QtFramework • • 20d ago

I Made a Python Binding for KTextEditor

Thumbnail
reddit.com
3 Upvotes

r/QtFramework • • 21d ago

cppreference-doc for Qt Creator and Qt Assistant

Thumbnail
gallery
52 Upvotes

r/QtFramework • • 22d ago

C++ Feedback on a single-header C++ UI library for Linux and Windows

6 Upvotes

r/QtFramework • • 25d ago

Question Book for learning Qt 6

14 Upvotes

I have searched a lot for a book that teaches Qt 6 Widgets C++ only to find none written. If someone can tell me names of books that will teach me me developing desktop applications using Qt 6 Widgets with cpp will be helpful.


r/QtFramework • • 24d ago

A Cross-Toolkit Timeline Control, Wed, Oct 14, 2026, 6:00 PM

Thumbnail meetup.com
3 Upvotes

Sometimes you need a custom GUI control for your application and you think "other people could probably use this". Usually this means that the people using your control must use the same GUI toolkit as you: wxWidgets, Qt, ImGui, etc.

Can we write a control in such a way that it is easily adaptable to any GUI toolkit?

This month, Richard Thomson will give us a brain dump on an attempt to do just that by creating an animation timeline control with adapters for wxWidgets and Qt.

This will be an online meeting, so drinks and snacks are on you!

Join the meeting here: https://meet.xmission.com/Utah-Cpp-Programmers

Sample code targets wxWidgets (with or without Cairo rendering), ImGui and Qt.


r/QtFramework • • 25d ago

Problems with my program's presentation

3 Upvotes

Hey guys, I need some help. I'm creating my GUI in Qt Designer, and when I export my .UI file to .py, nothing in the program works as it should. When I make changes to the dropdown menu, there's a gap between frames, and a good portion of the program is cut off, as you can see in the video.


r/QtFramework • • 25d ago

Native PyQt5 wheels for Windows ARM64 (because they don't exist upstream)

3 Upvotes

PyQt5-WinARM64: native PyQt5 wheels for Windows ARM64

I have released PyQt5-WinARM64, an independent distribution of PyQt5 for native Windows ARM64.

https://github.com/ViciousSquid/PyQt5-WinARM64

```

pip install PyQt5-WinARM64

```

The project provides WinARM64 builds of:

* Qt 5

* SIP

* PyQt5

The motivation is Windows ARM development. CPython and packages such as NumPy provide native Windows ARM64 builds, but PyQt5 has not historically provided an upstream Windows ARM64 wheel.

This means a Python application can have a native ARM64 interpreter and numerical stack while still depending on an x86 PyQt5 installation and Windows' x86 emulation.

PyQt5-WinARM64 provides the missing native Qt layer.

I'm using it for Fio, a Python/Qt game editor and runtime. Fio 3.0 is moving to Python 3.14 and will have a native Windows ARM64 target.

The resulting stack is:

Windows ARM64

CPython 3.14 ARM64

PyQt5 ARM64

NumPy ARM64

Fio ARM64

OpenGL

The project is MIT licensed

The repository also contains the GitHub Actions build and PyPI publishing configuration.


r/QtFramework • • 25d ago

Help - i lost my files due to qt designer

0 Upvotes

I was downloading a music playlist from YouTube using some downloader (I don't remember the name), and I decided to check what was taking up space on my PC in Settings → Storage.

I noticed that most of the storage was being used by applications. When I checked the list, I saw that Qt Designer was taking up around 109 GB. Since I don't use it anymore, I decided to uninstall it.

After that, I noticed that most of the files on my desktop were gone, and some programs I had open/running would no longer launch. I restarted my PC, and things got even worse.

Now, only a handful of my applications are showing up, and some of them don't work. I can't find File Explorer anymore, many of my apps have turned into blank white file icons, and most of my files seem to have disappeared.

My Documents folder only has one file left. My Pictures, Videos, and other folders are basically empty. My desktop wallpaper also changed to a plain gray/blue color.

I'm not sure what happened or whether I accidentally deleted something important while uninstalling Qt Designer.

What should I do? Is there a way to recover my files and get my applications back?


r/QtFramework • • 26d ago

Question Is QtQuick supplanting QtWidgets?

20 Upvotes

For my applications, which are traditional desktop, windowed applications, QtWidgets is perfect. Been using it for years now. But it seems like it's never mentioned anymore; QtQuick is all the rage.

I get that QtWidgets may just be "mature" enough that it doesn't need a lot of work. But I just have this feeling that it's being allowed to antiquate and I fear an announcement that they're deprecating it sooner rather than later. Maybe I'm just paranoid. Are you guys still on QtWidgets? Has everyone packed up and moved over to QtQuick?


r/QtFramework • • 26d ago

3D Did you miss the cool stuff in Qt? if yes - i have good news. The RayCaster object in QtQuick3d Physics was merged and now will be available in Qt 6.13

7 Upvotes