r/QtFramework

Feedback needed: Qt Bridges for C#
â–² 10 r/QtFramework

Feedback needed: Qt Bridges for C#

Hi folks! Disclaimer: Qt employee here.

We have just announced the Qt Bridges for C#.

Our goal is to make it possible to use Qt QML/Quick as a frontend with a backend written in a language other than C++. C# comes first.

You may say that there are C# bindings for Qt. Yep, that's true. Bindings allow you to write Qt apps in a Qt way, even with a different language. The Qt Bridges for C# technology will let you write apps more in a C# style, not like Qt-through-a-C#-keyhole.

I am not the project creator and cannot explain everything in this post. I was only involved in some documentation editing back in the day 😄
Cristián explains it much better: https://www.qt.io/blog/csharp-ui-framework-via-bridging-technology

What we really need is your honest feedback. We would be happy if you tried it out and let us know what you think. Honest criticism is the point of this post. Cristián will try to answer all the possible questions here in replies.

u/AC_qt — 18 hours ago
â–² 33 r/QtFramework

Looking for a job with Qt and C++ (10+ years of experience)

Hello everybody!

I am a Software Engineer based in Europe looking for a remote C++/Qt position. With over 10 years of professional experience, I specialize in building robust, high-performance applications, particularly in the Embedded Linux and Robotics/Industrial automation sectors.

Here is a brief overview of my skill set and background:

Core Expertise:

Qt & QML: Deep understanding of Qt internals, rendering mechanisms (GUI thread vs. render threads), and custom QML components.

Graphics Stack: Solid grasp of the modern Linux graphics stack (X11, Wayland), integration of the graphics pipeline with Qt/QML APIs, and writing custom GPU shaders.

C++ & Linux System Programming: Extensive experience with Linux C APIs (pthreads, timerfd, epoll, sockets), handling time-critical processes natively.

Domain Knowledge (Robotics / Hardware / Embedded):

Spent 6 years developing a large-scale Linux-based control system/platform using Qt/QML.

Hands-on experience integrating hardware and algorithms: OpenCV, V4L, ffmpeg, RS485 serial ports, TCP/UDP communication, kinematics calculations, gyroscopes, and servomotors.

Hardware Knowledge: I have a strong background in electronics. I can easily read electronic schematics and design custom PCBs/circuits with signals up to ~50MHz.

Additional Tech Stack Exposed To:

Android SDK/NDK, Java, Unity C#, Bullet3D, MQTT, custom Linux kernel compilation, and building Qt from source.

Modern Web/App dev: Flutter (frontend), Python + FastAPI + Pydantic + SQLite (backend), JWT authentication.

I am passionate about clean code, efficient architecture, and building reliable solutions from the hardware layer up to the UI.

My Open Source Work:

Here is a link to one of my recent open-source Qt/QML projects (a Linux desktop shell):

https://github.com/TomPecak/Maia_Shell

If your team is looking for a versatile Qt/C++ engineer, I would be more than happy to send my CV and have an introductory chat. Please feel free to DM me!

Thanks for reading!

u/Exotic_Avocado_1541 — 3 days ago
â–² 12 r/QtFramework+1 crossposts

Good news. The Qt quick3d engine implement joints support

The QtQuick3D.Physics module (starting from version 6.12) now features support for physical joints. This allows the physics engine to natively handle constraints and connections between bodies, which is essential for achieving physically accurate skin behavior, complex skeletal rigs, and natural ragdoll physics in games.

Core Architecture

All new joint types inherit from an abstract base type: PhysicsJoint.

Key rules of PhysicsJoint

  • Connects two bodies: bodyA and bodyB. If one body is left unassigned (null), the joint automatically anchors to the static world space.
  • Strict Requirement: At least one of the connected bodies must be dynamic.
  • Scene registration and lifecycle management are handled automatically behind the scenes via QPhysicsWorld::registerJoint() and deregisterJoint().
  • Local positioning and rotation relative to each body's frame are configured using:
    • positionA / positionB (vector3d)
    • orientationA / orientationB (quaternion)

Available Joint Types

Five specialized joint types have been introduced to handle specific constraints:

1. FixedJoint

Locks the relative position and orientation between two bodies completely. Perfect for composite objects or breakable structures.

2. DistanceJoint

Maintains the origins of the joint within a specified distance range.

  • minDistance — The lower bound of the constraint.
  • maxDistance — The upper bound of the constraint.

3. PrismaticJoint

Permits relative translational (linear) movement along a single axis (the local X-axis of the joint frame) while completely blocking relative rotation.

  • lowerLimit — Maximum translation along the negative X-axis.
  • upperLimit — Maximum translation along the positive X-axis.

4. RevoluteJoint

Commonly referred to as a hinge. It keeps the origins and X-axes of the frames aligned, allowing free rotation exclusively around this shared axis.

  • enableAngularLimit — Toggles the angular constraint (default is false).
  • angularLimitLower / angularLimitUpper — Lower and upper rotation limits specified in radians.

5. SphericalJoint

Also known as a ball-and-socket joint. It keeps the origins locked together but allows the orientations to vary freely (e.g., a shoulder or hip joint).

  • enableConeLimit — Toggles the cone limit constraint (default is false).
  • coneLimitY / coneLimitZ — Angular limits for the cone constraint specified in radians.

Key Takeaways for Developers

  • Natural Skins & Ragdolls: Essential for character physics, secondary clothing motion, and lifelike skeletal simulations.
  • Mechanical Simulation: Simplifies the implementation of vehicles, doors, levers, and suspension systems.
  • Tooling Support: The update includes built-in tests and dedicated Design Studio QML files, enabling visual setup and prototyping.
u/LetterheadTall8085 — 3 days ago
â–² 7 r/QtFramework+1 crossposts

qt 6.11.1 doesn't work on visual studio

new project without changing anything already contains build errors. i haven't seen anyone having this problem, qt vs tools, cmake, and qml extension is already downloaded. what am i missing ?

u/Sufficient-Captain66 — 6 days ago
â–² 6 r/QtFramework

Proxy Model or Normal Model For This?

(I'll provide code if requested, but this is more of a "philosophy" question in my opinion)

I have a subclassed QAbstractListModel which doesn't do anything special except for custom data roles. That model is used for a bunch of stuff, so it should be its own "thing."

But I'm also making an "editor" proxy model which takes the single-column source model, and adds additional columns for options such as "edit" "hide" "delete." This will be hooked up to a QTableView, and will have an item delegate drawing those additional options as buttons and, ideally, handling the click events via editorEvent.


So my question is about the "Editor" model. Since it refers to the source model, my instinct was to subclass a QAbstractProxyModel. mapToSource and mapFromSource hard-codes the column to 0 in both cases, since I can't properly map a column from a one-column model to a many-column model.

But then, in my delegate's editorEvent, the index I receive is correctly from the editor proxy model, but it's always column=0, so I can't determine which column/button was "pressed." It appears there are built-in mechanisms (which I didn't write) which cause the index to get mapped from source?

So, that's getting into some nasty territory in my opinion.

Alternatively, I could just subclass a QAbstractTableModel instead of a "real" proxy, and do it that way. But isn't that "incorrect" since it would be dependent upon a source model anyway?

reddit.com
u/PoopsInUrPee — 6 days ago
â–² 28 r/QtFramework

I made a shadergradient library for Qt

This C++ library supports both Qt and Qt Widgets.

I initially made this to use it for our custom SDDM greeter then decided to release it as a library for Qt. Came across the amazing shadergradient react library and used their cool shaders as a base for this project. Includes a preview window that can be used to customize and save as a preset.

This is my first ever Qt library and its still a work in progress, feedback would be appreciated :D

Github repo : https://github.com/ShaunV334/shadygradients-qt

u/rocket-_-_ — 7 days ago
â–² 23 r/QtFramework+1 crossposts

Long live Qt for HarmonyOS!

With [change 733351 in Qt Gerrit][1] now merged into the dev branch of qtbase, along with several other changes merged into the qt5 dev branch (see [the harmonyos_upstream topic][2]), qtbase dev now supports building on HarmonyOS 6.0.0 (API Level 20).

If you are interested in building qtbase for HarmonyOS, please refer to the [Qt Wiki page][3].

[1]: https://codereview.qt-project.org/c/qt/qtbase/+/733351

[2]: https://codereview.qt-project.org/q/topic:%22harmonyos_upstream%22+status:merged

[3]: https://wiki.qt.io/Building_Qt6_for_HarmonyOS

reddit.com
u/cavendishqi — 7 days ago
â–² 90 r/QtFramework+1 crossposts

Custom Robotics Simulator focused on a drag-and-drop prefab workflow.

Check it out::
https://github.com/alfaiajanon/RoboticsStudio

The problem:
When I first got into robotics, the biggest frustration I faced was that I couldn't just test real hardware in a simulation. Most simulators aren't built around prefabs, and the ones that are usually just give you 3D visual assets with zero actual behavior attached to them.

So....
I built this simulator as a proof of concept to fix that. The focus here is strictly on beginners and creating an educational sandbox. You just drag and drop parts to build the robot, and then jump straight into scripting.

The features:

  • Prefab Assembly
  • Built-in JS Editor (arduino like)
  • Live Telemetry

Note: As i was the only dev, to speed up, I leaned heavily on AI for coding assistance (used as a copilot, no autonomous agents were used).

u/No-Veterinarian-7069 — 12 days ago
â–² 1 r/QtFramework

An Unknown Segfault

Hello,

I'm creating an application that is used to scan MTG Cards in real-time from 4 or more cameras, and output the nameplate list of each camera to a per-camera-window, which can then be captured in a streaming platform like OBS. It is in early stage and the actual detection/processing is not yet implemented, partially because of this segfault. It uses Qt, tbb queues and tbb::flow::graph.

https://github.com/ahsanullah-8bit/MTGScanner.git

At first made it work (with the integrated camera), a few problems occurred with QtMultimedia that I didn't know of (or partially known):

  • You can't have any QtMultimedia in any other thread than the main thread.
  • You can't use a camera device twice, at the same time.

The project uses a custom ChannelWizard dialog component that involves 3 steps. Step 1 lets you select a camera, it has a combo box and a live preview below that. First thought would be, to just use VideoOutput, MediaCaptureSession, MediaDevices and Camera QML types for the wizard camera selection. But when the wizard closes, we have to add the channel to the Engine and now you've to destroy the Camera and MediaCaptureSession, because they still hold the camera handle. Back then, I would initialize the QCamera and QMediaCaptureSession in a per-camera capture thread, called CameraMetrics (which lived in the main thread) methods from the tbb::flow::graph nodes and lot more synchronizarion problems. Now, we ask the engine (from QML) to provide us a Channel (custom type holding per-camera half-components, including QCamera and QMediaCaptureSession) object, owned by C++ and use it to display the preview, pass it back to C++ if channel is to be created or destroy it, if canceled. Channel is used for the main thread and ChannelRaw is used by the EngineWorker thread, as it holds the supposedly thread safe components. Both are connected by main thread giving frames, and worker thread giving metrics QAtomicInts.

The segfault occurred in the previous (commit 37913a9) and the current (commit 806aeba) architecture.

Before, if there were no channels, you add one, and launch the wizard again, it would not show anything in the preview (Camera probably fails silently) for the same camera. You close the app, let it save the channel configurations, launch it again, a simple click on the Add Channel button causes a segfault.

Now, with the QtMultimedia moved to the main thread, I sometimes, get it at the start, or clicking a channel, or Add Channel. Disabling ChannelWizard sometimes work. I can't debug it. It produces this call stack almost always:


2  QV4::Managed::mark                                                                                                                                                                            qv4managed_p.h                    178  0x7ffff6cda402

3  QV4::MemoryManager::collectFromJSStack                                                                                                                                                        qv4mm.cpp                         1474 0x7ffff6cda402

4  QV4::(anonymous namespace)::markJSStack                                                                                                                                                       unique_ptr.h                      173  0x7ffff6cda51b` 

5  QV4::GCStateMachine::transition                                                                                                                                                               qv4mm.cpp                         1567 0x7ffff6cdacb7` 

6  QV4::GCStateMachine::step                                                                                                                                                                     qv4mm_p.h                         89   0x7ffff6cdbd55

7  QV4::MemoryManager::runGC                                                                                                                                                                     qv4mm.cpp                         1289 0x7ffff6cdbd55

8  QV4::MemoryManager::allocate                                                                                                                                                                  qv4mm_p.h                         409  0x7ffff6cdeae4

9  QV4::MemoryManager::allocData                                                                                                                                                                 qv4mm.cpp                         1011 0x7ffff6cdeae4 

10 QV4::MemoryManager::allocManaged<QV4::CallContext>                                                                                                                                            qv4mm_p.h                         215  0x7ffff6bbc5c6

11 QV4::ExecutionContext::newCallContext                                                                                                                                                         qv4context.cpp                    74   0x7ffff6bbc5c6

12 QV4::Runtime::PushCallContext::call                                                                                                                                                           qv4runtime.cpp                    1758 0x7ffff6c84ebd

13 QV4::Moth::VME::interpret                                                                                                                                                                     qv4vme_moth.cpp                   926  0x7ffff6cd0344

14 QV4::Moth::VME::exec                                                                                                                                                                          qv4vme_moth.cpp                   493  0x7ffff6cd65e3

15 QV4::doCall                                                                                                                                                                                   qv4function.cpp                   53   0x7ffff6c09a8a

16 QV4::Function::call                                                                                                                                                                           qv4function.cpp                   78   0x7ffff6c09d21

17 QQmlJavaScriptExpression::evaluate                                                                                                                                                            qqmljavascriptexpression.cpp      238  0x7ffff6d7f293 

18 QQmlBinding::evaluate                                                                                                                                                                         qqmlbinding.cpp                   195  0x7ffff6d0de8d

19 QQmlBinding::doUpdate                                                                                                                                                                         qqmlbinding.cpp                   713  0x7ffff6d0dfa9

20 QQmlBinding::update                                                                                                                                                                           qqmlbinding.cpp                   165  0x7ffff6d117b2

21 QPropertyObserverPointer::notify                                                                                                                                                              qproperty_p.h                     916  0x7ffff4c2e1af

22 QObjectCompatProperty<QQuickItemPrivate, double, &QQuickItemPrivate::_qt_property_height_offset, &QQuickItemPrivate::setHeight, &QQuickItemPrivate::heightChanged, decltype(nullptr)>::notify qproperty_p.h                     671  0x7ffff4c2e1af

23 QQuickItem::geometryChange                                                                                                                                                                    qquickitem.cpp                    3921 0x7ffff4c1aabc

24 QQuickItem::setSize                                                                                                                                                                           qquickitem.cpp                    7790 0x7ffff4c11ff0

25 QQuickControlPrivate::resizeBackground                                                                                                                                                        qquickcontrol.cpp                 366  0x7ffff5309b1b

26 QQuickControl::geometryChange                                                                                                                                                                 qquickcontrol.cpp                 2134 0x7ffff5313ddd

27 QQuickItem::setSize                                                                                                                                                                           qquickitem.cpp                    7790 0x7ffff4c11ff0

28 QQuickGridLayoutItem::setGeometry                                                                                                                                                             qquickgridlayoutengine_p.h        86   0x7fffc3fbf196

29 QGridLayoutEngine::setGeometries                                                                                                                                                              qgridlayoutengine.cpp             1060 0x7ffff77acede

30 QQuickGridLayoutBase::rearrange                                                                                                                                                               qquicklinearlayout.cpp            479  0x7fffc3fbce66

31 QQuickLayout::geometryChange                                                                                                                                                                  qquicklayout.cpp                  980  0x7fffc3fb953d

32 QQuickItem::setSize                                                                                                                                                                           qquickitem.cpp                    7790 0x7ffff4c11ff0

33 QQuickAnchorsPrivate::setItemSize                                                                                                                                                             qquickanchors.cpp                 392  0x7ffff4bda0fa

34 QQuickAnchorsPrivate::fillChanged                                                                                                                                                             qquickanchors.cpp                 168  0x7ffff4bda0fa

35 operator()                                                                                                                                                                                    qquickitem.cpp                    3909 0x7ffff4c1aa25

36 QQuickItemPrivate::notifyChangeListeners<QQuickItem::geometryChange(const QRectF&, const QRectF&)::<lambda(const QQuickItemPrivate::ChangeListener&)>>                                        qquickitem_p.h                    416  0x7ffff4c1aa25

37 QQuickItem::geometryChange                                                                                                                                                                    qquickitem.cpp                    3907 0x7ffff4c1aa25

38 QQuickItem::setHeight                                                                                                                                                                         qquickitem.cpp                    7614 0x7ffff4c114ea

39 QQuickPagePrivate::relayout                                                                                                                                                                   qquickpage.cpp                    117  0x7ffff5335ec4

40 QQuickControl::geometryChange                                                                                                                                                                 qquickcontrol.cpp                 2135 0x7ffff5313dea

41 QQuickItem::setSize                                                                                                                                                                           qquickitem.cpp                    7790 0x7ffff4c11ff0

42 QQuickAnchorsPrivate::setItemSize                                                                                                                                                             qquickanchors.cpp                 392  0x7ffff4bda0fa

43 QQuickAnchorsPrivate::fillChanged                                                                                                                                                             qquickanchors.cpp                 168  0x7ffff4bda0fa

44 operator()                                                                                                                                                                                    qquickitem.cpp                    3909 0x7ffff4c1aa25

45 QQuickItemPrivate::notifyChangeListeners<QQuickItem::geometryChange(const QRectF&, const QRectF&)::<lambda(const QQuickItemPrivate::ChangeListener&)>>                                        qquickitem_p.h                    416  0x7ffff4c1aa25 

46 QQuickItem::geometryChange                                                                                                                                                                    qquickitem.cpp                    3907 0x7ffff4c1aa25

47 QQuickItem::setSize                                                                                                                                                                           qquickitem.cpp                    7790 0x7ffff4c11ff0

48 QQuickControlPrivate::resizeContent                                                                                                                                                           qquickcontrol.cpp                 377  0x7ffff5310594

49 QQuickControl::paddingChange                                                                                                                                                                  qquickcontrol.cpp                 2174 0x7ffff530a8f8

50 QQuickControlPrivate::setTopPadding                                                                                                                                                           qquickcontrol.cpp                 200  0x7ffff530a8f8

51 QQmlPropertyData::writeProperty                                                                                                                                                               qqmlpropertydata_p.h              413  0x7ffff6d1589b

52 QQmlPropertyPrivate::write                                                                                                                                                                    qqmlproperty.cpp                  1920 0x7ffff6dd85ca

53 QQmlPropertyPrivate::writeValueProperty                                                                                                                                                       qqmlproperty.cpp                  1328 0x7ffff6ddc1c4

54 QQmlPropertyToUnbindablePropertyBinding::update                                                                                                                                               qqmlpropertytopropertybinding.cpp 111  0x7ffff6df1c67

55 QQmlNotifier::emitNotify                                                                                                                                                                      qqmlnotifier.cpp                  74   0x7ffff6dacbdd

56 doActivate<false>                                                                                                                                                                             qobject.cpp                       4147 0x7ffff63e82cb

57 QMetaObject::activate                                                                                                                                                                         qobject.cpp                       4317 0x7ffff63e0867

58 QQuickSafeArea::marginsChanged                                                                                                                                                                moc_qquicksafearea_p.cpp          169  0x7ffff4c63304 

59 QQuickSafeArea::updateSafeArea                                                                                                                                                                qquicksafearea.cpp                293  0x7ffff4c63c4f

60 QQuickSafeArea::updateSafeAreasRecursively                                                                                                                                                    qquicksafearea.cpp                394  0x7ffff4c64ead 

61 QQuickSafeArea::setAdditionalMargins                                                                                                                                                          qquicksafearea.cpp                194  0x7ffff4c65003

62 QQuickApplicationWindowPrivate::relayout                                                                                                                                                      qquickapplicationwindow.cpp       176  0x7ffff52fa62b

63 operator()                                                                                                                                                                                    qquickitem.cpp                    3909 0x7ffff4c1aa25

64 QQuickItemPrivate::notifyChangeListeners<QQuickItem::geometryChange(const QRectF&, const QRectF&)::<lambda(const QQuickItemPrivate::ChangeListener&)>>                                        qquickitem_p.h                    416  0x7ffff4c1aa25

65 QQuickItem::geometryChange                                                                                                                                                                    qquickitem.cpp                    3907 0x7ffff4c1aa25

66 QQuickControl::geometryChange                                                                                                                                                                 qquickcontrol.cpp                 2133 0x7ffff5313dd0

67 QQuickItem::setWidth                                                                                                                                                                          qquickitem.cpp                    7406 0x7ffff4c10ada

68 layoutItem                                                                                                                                                                                    qquickapplicationwindow.cpp       125  0x7ffff52fa052

69 layoutItem                                                                                                                                                                                    qnumeric.h                        297  0x7ffff52fa425

70 QQuickApplicationWindowPrivate::relayout                                                                                                                                                      qquickapplicationwindow.cpp       160  0x7ffff52fa425

71 QQuickApplicationWindowPrivate::executeBackground                                                                                                                                             qquickapplicationwindow.cpp       294  0x7ffff52fae6a

72 QQuickApplicationWindow::componentComplete                                                                                                                                                    qquickapplicationwindow.cpp       822  0x7ffff52fda1b 

73 QQmlObjectCreator::finalize                                                                                                                                                                   qqmlobjectcreator.cpp             1617 0x7ffff6dafe42

74 QQmlComponentPrivate::complete                                                                                                                                                                qbipointer_p.h                    133  0x7ffff6d2d540

75 QQmlComponentPrivate::completeCreate                                                                                                                                                          qqmlcomponent.cpp                 1344 0x7ffff6d338eb

76 QQmlComponent::completeCreate                                                                                                                                                                 qqmlcomponent.cpp                 1310 0x7ffff6d34333 

77 QQmlComponentPrivate::createWithProperties                                                                                                                                                    qqmlcomponent.cpp                 998  0x7ffff6d34333

78 QQmlComponent::create                                                                                                                                                                         qqmlcomponent.cpp                 938  0x7ffff6d3463d

79 QQmlApplicationEnginePrivate::finishLoad                                                                                                                                                      qqmlapplicationengine.cpp         158  0x7ffff6d0cc93

80 QQmlApplicationEnginePrivate::ensureLoadingFinishes                                                                                                                                           qqmlapplicationengine.cpp         185  0x7ffff6d0ce9c

81 QQmlApplicationEnginePrivate::startLoad                                                                                                                                                       qqmlapplicationengine.cpp         144  0x7ffff6d0d236

82 main                                                                                                                                                                                         main.cpp                          29   0x5555555a08a2

Google AI Search said, these are the common causes:

  • Object Ownership Issues
  • Dangling Pointers in Loaders
  • Uninitialized C++ Objects
  • Module-Specific Bugs
  • Lifecycle of argc/argv

I know the call stack says, the garbage collector is having the segfault. But I looked at my code again and again, tried different LLMs, questions, posts, articles, and I'm exhausted. It might just be single line, mistake or misuse. If you got some free time on your hand, please have a look at it. Again, the project is still in development, so you might find some broken code.

It should compile on both Linux and Windows.

Thank you!

reddit.com
u/MadAndSadGuy — 11 days ago
â–² 1 r/QtFramework

RTSP, gstreamer, QRhi, and QQuickRhiItem???

I am attempting to render an rtsp stream from a camera(s). I want to make sure I am using hardware rendering as correctly as possible. What is the correct method to use for this? Should I use MediaPlayer and VideoOutput (this doesn't always work with the cameras I want)?

Edit:

Does anyone know how to get qml6glsink working in qquick?

reddit.com
u/F_DOG_93 — 11 days ago
â–² 6 r/QtFramework

What Qt Creator plugin are you missing?

I want to experiment building a Qt Creator plugin and I'm looking for inspiration.
What is one feature or tool you feel is missing?

reddit.com
u/ContentDiamond6103 — 11 days ago
â–² 13 r/QtFramework+1 crossposts

I built a completely offline desktop app that clusters photos by face

Hey everyone,

Over the past few months, I’ve been building a local face-clustering app using C++, Qt and dlib. It scans a directory and groups photos of the same person together—completely on-device without any cloud dependencies.

I built it for myself because manual sorting is a pain and I didn't want to rely on cloud services. It currently runs on Linux and Windows and currently available in itch.io

Link: https://sam824.itch.io/ai-photocluster

reddit.com
u/Worldly-Let708 — 11 days ago
â–² 4 r/QtFramework

Efficiently using QFileSystemModel for watching several subfolders

I'm writing a program, and for many features, the user can save presets. Those presets are written to individual files in appropriate subfolders inside the application's local storage path. So on macos it might look like:

  • ~/Library/Application Support/MyOrg/MyProgram/themes
  • ~/Library/Application Support/MyOrg/MyProgram/filters
  • ~/Library/Application Support/MyOrg/MyProgram/sounds

For the user to select existing presets, I want to list the contents of the appropriate subfolder in a QComboBox. I want the combo boxes to update live.

So I can do this if I create a QFileSystemModel for every combo box and set its root path to each subfolder and set each combo box root index to the index of that model. But that seems inefficient, especially since on some platforms, file watchers are limited.

So I tried making a QSortFilterProxyModel, and for filterAcceptsRow, I tried taking the source parent index, getting the Roles.FilePathRole, and comparing it to the path of the subfolder I want to watch for each QComboBox. But the way the file system model populates data is apparently async, so I'm hitting all kinds of invalid index issues getting this to work.

The user may have many multiple instances of the main window open, so the number of combo boxes needed to show preset selections can grow pretty large. So I want to approach this with SOME sort of attempt at optimization.

Am I approaching things the wrong way here?

reddit.com
u/PoopsInUrPee — 14 days ago