Skip to content
  • Add resource file (*.qrc) to static library. How?

    Unsolved General and Desktop
    2
    0 Votes
    2 Posts
    20 Views
    I
    I don't know anything specific about QML modules, but in general - if you want to load a resource file from a static library, you need explicitly load it by adding the Q_INIT_RESOURCE macro somewhere in your main application target. See the docs: https://doc.qt.io/qt-6/qtresource-qtcore-proxy.html#Q_INIT_RESOURCE
  • CMake problem with Qt 6.10.0

    Solved General and Desktop
    5
    0 Votes
    5 Posts
    58 Views
    I
    @EduardoQtDev said in CMake problem with Qt 6.10.0: Just in case someone wants to open a bug report. https://bugreports.qt.io/browse/QTBUG-137577 - Known, and already fixed it seems. You'll need to wait for beta2, or build from Git.
  • Share files in Qt QML/C++ app in Android

    Unsolved Mobile and Embedded
    1
    0 Votes
    1 Posts
    12 Views
    No one has replied
  • QFont : point vs pixel

    Unsolved French
    6
    0 Votes
    6 Posts
    125 Views
    SGaistS
    Excellent ! Merci pour le pointeur La gestion des écrans n'est jamais chose aisée. Spécialement depuis l'avènement des DPis de hautes valeurs.
  • QProcess starting on macos only when run from terminal

    Solved General and Desktop
    10
    0 Votes
    10 Posts
    116 Views
    SGaistS
    One other possible option that might also make your users happy: have a setting in your application that allows to set the path to ffmpeg so if they have a custom version they want to use, they can change for it. You can populate that value checking for known paths.
  • SVG file in qhelpgenerator / assistant

    Unsolved Qt Creator and other tools
    23
    0 Votes
    23 Posts
    3k Views
    S
    I finally managed to get proper help back again, so I'm sharing the solution juuuust in case some other lost soul comes here in search of an answer. Clone the QtCreator source code. Checkout version v7.0.2 (this is the last version that supports Qt5). Build it against Qt5. Select "QtWebEngine" as the help renderer. Not only did rolling back to v7.0.2 + Qt5 give me proper help, but it also fixed a whole plethora of other annoying bugs. And even if there was any actual functionality added since that version, I didn't notice it, so I didn't even lose anything. [image: 681d75c2-ecb0-4a7a-8680-f0fa0267bf36.png]
  • QQuickFramebufferObject with external OpenGL in Qt6

    Unsolved QML and Qt Quick qt6 fbo opengl
    7
    0 Votes
    7 Posts
    2k Views
    D
    I'm currently working on getting on of my older applications to work with PyQt6 on Wayland. The python-mpv library has classically used an X window ID for telling mpv where to render, but that obviously won't work on Wayland. There are several examples of using OpenGL rendering with python-mpv: https://github.com/trin94/qtquick-mpv The PySide6 example does work, but my entire application is written in PyQt6: https://gitlab.com/djsumdog/mediahug/ I've been playing around with the code trying to figure out what's happening. All the mpv output looks identical between the different API examples. Creating another window and commenting out the setSource/show for the quickview prevents it from crashing out. I guess there might be an issue with the PyQt6 bindings? I'd really rather not trade out everything in my code for PySide.
  • Android X86_64 App crashes before reaching Qt main.

    Unsolved Mobile and Embedded
    2
    0 Votes
    2 Posts
    30 Views
    SMF-QtS
    @SMF-Qt I have made some progress: I updated the JDK to 24.0.1, Gradle to 8.14 and using SDK API 35 things have started to work. I have a simple test Qt app that pops up a window with the words "Hello World" on a QLabel and a QPushbutton that closes the app and this works fine with this setup on my simulated test phone. My more complicated test App using this setup now builds and deploys to the test phone. However it crashes (expected failure) the good news is it is now crashing in my code the bad news is that when the debugger stops at the failure all I get in the debug output is assembler code not the C++ that my app is written in (android studio also complains about missing debug symbols when I try to debug the apk file). I believe that when qtcreator deploys the app even though it is a debug build it is stripping the debug info from the apk file. What is the correct way to configure qtcreator to stop it doing this?
  • QProcess::terminate() or QProcess::close()

    Unsolved General and Desktop
    5
    0 Votes
    5 Posts
    48 Views
    Kent-DorfmanK
    There is a concept in multi-processing that says you should not "have" to close or terminate a process/thread, but that you should signal it to end gracefully, and catch a status when it is done. ie, the responsibility for ending lies in the child itself, not in the parent, and that close/terminate are only for handlign exceptional error conditions. In some frameworks they haven't even implemented close/terminate.
  • 0 Votes
    2 Posts
    24 Views
    Kent-DorfmanK
    Interesting project. I mean sure, you can use Qt and/or python, but Qt utility would be mostly in data presentation. The core simulation engine would have little to do with the chosen platform. As for best-practices, I'd recommend reading a primer on simulations. Good sims maintain their own internal "clock/counter" and are deterministic is that you can reset the sim to a specific state by setting the clock value manually. Most people don't think about that unless they are familiar with sims.
  • Web Engine not working and Qt6_FOUND to FALSE

    Unsolved QtWebEngine
    2
    0 Votes
    2 Posts
    15 Views
    Christian EhrlicherC
    Mingw does not provide webengine. You have to use msvc
  • 0 Votes
    5 Posts
    35 Views
    Christian EhrlicherC
    And why do you don't use english in the bug report? Please fix.
  • How to create a TableView in QML

    Unsolved General and Desktop
    2
    0 Votes
    2 Posts
    42 Views
    A
    in fact you need two structures : one core structure containing all the data, called the model, and a UI component displaying the data from the model. It is bit more complex and time consuming to setup than an excel/libreoffice spreadsheet, but much more lightweight and offers you more control and more protection on how data are displayed or edited, which cells are editable. creating a view in TableView { id: tableView anchors.fill: parent // or whatever anchoring/positionning/layout you want model: yourTableModel // should be declared nearby } Please note that TableView on it's own doesn't provide horizontal and vertical headers, you have to add VerticalHeaderView and HorizontalHeaderView manually. https://doc.qt.io/qt-6/qml-qtquick-controls-verticalheaderview.html for the model, you have two options : either you subclass QAbstractTableModel, adding a QML_ELEMENT macro after Q_OBJECT, and declaring those source files in a qt_add_qml_module directive in CMakeLists.txt The TableView documentation provides a minimal example of a model that can be used in a QML view : https://doc.qt.io/qt-6/qml-qtquick-tableview.html or you can use the ListModel QML element if your model isn't much complex. Option one is usually advised for production. Option two is often used by UI dev to supply a sample model to work on the view itself.
  • How to get Qt5.15 on Windows ?

    Unsolved General and Desktop compile qt5.15.2 windows10
    6
    0 Votes
    6 Posts
    1k Views
    S
    https://download.qt.io/official_releases/qt/
  • Setting environment variables for vcpkg

    Solved Installation and Deployment
    2
    0 Votes
    2 Posts
    34 Views
    PerdrixP
    To answer my own question! I used "Add New Project Property Sheet" to add a property sheet called vcpkg. I told it to save it a file called vcpkg.props in the root directory of the solution. I then configured the two User Macros as above. I then used "Add Existing Property Sheet" to add this file to all configurations of all the projects in the solution. Sounds rather awkward, but it does seem to work.
  • WebEngine doing stuff I don't think it should be.

    Unsolved QtWebEngine
    1
    0 Votes
    1 Posts
    13 Views
    No one has replied
  • Strange QSettings issue with Qt6 on Jenkins

    Unsolved General and Desktop
    4
    0 Votes
    4 Posts
    53 Views
    SGaistS
    Hi, In addition to the questions of my fellows, one thing to consider for the tests is to write the file to a known read/write path rather than relying on system defaults.
  • Create signal with / from stdin

    Unsolved General and Desktop
    11
    0 Votes
    11 Posts
    3k Views
    T
    The fact that Qt does not implement a direct method to generate QIODevice-like signals for stdin implies that doing so is difficult or impossible. The problem with using a separate QThread in the child to generate signals by blocking on sys.stdin.readline() is getting that QThread to exit. QThread.terminate() does not terminate that QThread until a line of input is received. All related answers ignore this problem. I was able to workaround this by having the parent process feeding the child's stdin send "exit\n", and have the child's stdin-reading QThread detect that line and call its QThread.exit().
  • ChartView LineSeries and model data

    Unsolved QML and Qt Quick
    1
    0 Votes
    1 Posts
    14 Views
    No one has replied
  • Testing Android APK with QtCreator fails with an error.

    Unsolved Qt Creator and other tools
    33
    0 Votes
    33 Posts
    621 Views
    SMF-QtS
    @SMF-Qt Ok thanks for the suggestions I now have a working X86_64 emulator and an X86_64 apk build that deploys to the emulated phone. My next problem is that the deployed app crashes on startup, but to investigate that I think I will start a new thread and come back to the arm64-v8a problems when my test application is more usable. ... Installing Android package to device. Running command "/opt/android/sdk/platform-tools/adb -s emulator-5554 install -r /work/Qt-Android/QtTest/application/build/Android_Qt_6_9_1_qt_androidX86_Clang_x86_64-Debug/android-build//build/outputs/apk/debug/android-build-debug.apk" Performing Streamed Install Success Android package built successfully in 0.572 ms. -- It can now be run from the selected device/emulator. -- File: /work/Qt-Android/QtTest/application/build/Android_Qt_6_9_1_qt_androidX86_Clang_x86_64-Debug/android-build//build/outputs/apk/debug/android-build-debug.apk 14:18:06: The process "/opt/qt6/bin/androiddeployqt" exited normally. 14:18:06: Package deploy: Running command "/opt/android/sdk/platform-tools/adb -s emulator-5554 pull /system/bin/app_process64 /work/Qt-Android/QtTest/application/build/Android_Qt_6_9_1_qt_androidX86_Clang_x86_64-Debug/android-app-process/app_process". 14:18:06: Package deploy: Running command "/opt/android/sdk/platform-tools/adb -s emulator-5554 pull /system/bin/linker64 /work/Qt-Android/QtTest/application/build/Android_Qt_6_9_1_qt_androidX86_Clang_x86_64-Debug/android-app-process/linker64". 14:18:06: Package deploy: Running command "/opt/android/sdk/platform-tools/adb -s emulator-5554 pull /system/lib64/libc.so /work/Qt-Android/QtTest/application/build/Android_Qt_6_9_1_qt_androidX86_Clang_x86_64-Debug/android-app-process/libc.so". 14:18:06: Elapsed time: 00:05.