Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.7k Topics 457.9k Posts
  • Reporting inappropriate content on the forums

    Pinned Locked spam
    29
    4 Votes
    29 Posts
    36k Views
    A
    Thank you for the report. I have banned the user, which got rid of the spam posting. Not a loss, as this user did not post any other content on the site. Just deleting this one posting was not possible. Thanks for reporting this.
  • repaint() on macOS

    Unsolved
    2
    0 Votes
    2 Posts
    47 Views
    PerdrixP
    bump ... anyone have ideas about this - is it a bug - if so I will report it.
  • pre-compiled QT headers

    Unsolved
    2
    0 Votes
    2 Posts
    31 Views
    Pl45m4P
    @JacobNowitsky What's so hard about creating a PCH file like // myApp_pch.h #include <QApplication> #include <QWidget> and then enable the PCH support depending on your build system?! BTW: The video even explains how to set this up... so what do you mean?!
  • Migrating from Qt3 to 5.15.13

    Unsolved
    10
    0 Votes
    10 Posts
    165 Views
    Pl45m4P
    @DevMattew said in Migrating from Qt3 to 5.15.13: We have a custom objects who herits from QButtonGroup in Qt3 & 5. [...] In Qt5, however, radio buttons are not exclusive by default. Once they are part of a QButtonGroup they are. So this should not make any difference if you have a group anyway. @DevMattew said in Migrating from Qt3 to 5.15.13: Fun fact: when I took on this mission, someone gave me the entire project and the folder was named xxxx-Qt6, but the compiled version of Qt was actually 5.15.11. Maybe the plan was to migrate to Qt6 (which I also would recommend when you reached a point of a "running" Qt5 build), but the installed version at that time was Qt5.15... @DevMattew said in Migrating from Qt3 to 5.15.13: I mentioned unit testing, but I was told that it didn't align with the company's mindset. The same goes for comments in the code, but I'll add them anyway and take a look at the bug tracker. Doing things quick & dirty is very common and no shame... but refusing to fix it when you re-visit the code again anyway during the migration process is stupid... Because the whole idea of "quick and dirty" is to, hopefully, come back to it later and clean things up, which - unfortunately - does not happen very often :) Good luck :)
  • QString::compare: Strings with same output compare as different?

    Solved
    2
    0 Votes
    2 Posts
    29 Views
    A
    Got it. By-value lambda capture of const reference...
  • custom plot

    Unsolved
    10
    0 Votes
    10 Posts
    1k Views
    A
    @Rockerz said in custom plot: @JonB I tried but I got tar.gz file extracted and add these file (qcustomplot.h, qcustomplot.cpp) I'm getting many unresolved errors where to get the dll file ? I searched and I download from official website only tar files I found (https://www.qcustomplot.com/index.php/introduction) QCustomPlot doesn’t provide a DLL — you must compile the .cpp/.h files into your project. Just add them to your Qt project and rebuild; no external DLL needed.
  • Does Qt Support HDR Image/Video Rendering?

    Unsolved
    2
    0 Votes
    2 Posts
    53 Views
    SGaistS
    Hi, Did you already check QVideoFrameFormat and its friends to check whether they fit your need somehow ?
  • Model-view checkstate signal

    Unsolved
    10
    0 Votes
    10 Posts
    146 Views
    SGaistS
    Hi, A model can have multiple views and a view does not necessarily mean a QWidget. As my fellow already wrote: use your model. Rather than creating it as part of the setModel call, create it before and keep a reference to it. Then connect its dataChanged signal to the slot you want to use it with. The only thing you have to do is extract the information you want to act accordingly.
  • Strange crash in QApplication constructor

    Unsolved crash qcoreapp
    15
    0 Votes
    15 Posts
    312 Views
    I
    @Jakob-Kenda Correct me if I'm wrong, but that looks like it was taken with the LD_LIBRARY_PATH set to the Qt installation?
  • 0 Votes
    3 Posts
    69 Views
    I
    @dan-ca An alternative approach is to used the built-in VNC platform plugin (triggered by starting the application with the -platform vnc argument). It works by starting a private VNC server that serves just the app window, so somewhat similar to (but more limited than) X11 forwarding. IIRC it isn't built by default on macOS but should be possible to add it to a build. Though I second the point of getting a physical Mac, it is really the path of least resistance... A M2 Mac Mini is reasonably cheap and is a great extra machine to have even if you daily drive Linux.
  • Linking external .dll with CMake

    Solved
    3
    0 Votes
    3 Posts
    79 Views
    B
    @SGaist Thanks for the reply, they didn't provide the .lib files in the source code, so I had to generate them myself. I was able to find https://wiki.videolan.org/GenerateLibFromDll explaining how to do it and got the application to run now, thanks!
  • This topic is deleted!

    Unsolved
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • QTest fails to compile when in QCOMPARE use classes under some namespace

    Solved
    6
    0 Votes
    6 Posts
    450 Views
    A
    I've got same trouble and this is not signature/declaration issue (e.g. "T v" vs "const T& v"). Building same code (without wrapping operator== to "required" namespace) with same compiler vendor and default compile options and for exactly same Qt6 version succeeds on one computer and fails on other computer. Yet I didn't investigated why it happens, but most obvious difference is compiler versions. Maybe it's a bug. Maybe different versions of C++ standard (selected by compiler by default) behave differently in this aspect.
  • 0 Votes
    2 Posts
    89 Views
    SGaistS
    Hi and welcome to devnet, Which version of Qt Creator is it ? On which platform ?
  • qt vnc client example with Hextile encoding

    Unsolved
    1
    0 Votes
    1 Posts
    46 Views
    No one has replied
  • QPushButton does not scale on pressed state (regression from Qt 5)

    Unsolved
    4
    0 Votes
    4 Posts
    86 Views
    W
    Also mentioned that version in the bugreport.
  • Memory leak while using QOpenglWidget

    Unsolved
    7
    0 Votes
    7 Posts
    309 Views
    Axel SpoerlA
    @summit Then it's an NVIDIA problem.
  • My built and deployed Qt application does not start.

    Solved
    6
    0 Votes
    6 Posts
    245 Views
    K
    I made the following changes to each file: CMakeLists.txt Deleted qt_policy(SET QTP0001 NEW) Added REQUIRES 6.5 to the qt_standard_project_setup argument main.cpp Added using namespace Qt::Literals::StringLiterals; after include. Changed url(u"qrc:/QmlCppExample/main.qml"_qs) to url("qrc:/qt/qml/QmlCppExample/main.qml"_s) For this, I referred to the following: https://www.qt.io/blog/whats-new-for-qml-modules-in-6.5 Console log for cmake configure > cmake --preset msvc-x64-debug Preset CMake variables: CMAKE_BUILD_TYPE="Debug" CMAKE_CXX_COMPILER="cl" CMAKE_INSTALL_PREFIX:PATH="E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug" CMAKE_PREFIX_PATH="D:\Qt\6.9.3\msvc2022_64" -- The CXX compiler identification is MSVC 19.38.33134.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: D:/ProgramFiles/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for C++ include pthread.h -- Looking for C++ include pthread.h - not found -- Found Threads: TRUE -- Performing Test HAVE_STDATOMIC -- Performing Test HAVE_STDATOMIC - Success -- Found WrapAtomic: TRUE -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) -- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR) -- -- -- deploy_script :E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/build/debug/.qt/deploy_qml_app_appqml_cpp_example_f260af503d.cmake -- -- -- Configuring done -- Generating done -- Build files have been written to: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/build/debug Console log for cmake build and install > cmake --build build\debug --target install [19/20] Install the project...-- Install configuration: "Debug" -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/bin/appqml-cpp-example.exe -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/QtQuick/qmldir -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/QtQuick/qtquick2plugind.dll -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/QtQml/qmldir -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/QtQml/qmlplugind.dll -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/QtQml/Models/qmldir -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/QtQml/Models/modelsplugind.dll -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/QtQml/WorkerScript/qmldir -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/QtQml/WorkerScript/workerscriptplugind.dll -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/QtQuick/Controls/Basic/qmldir -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/QtQuick/Controls/Basic/qtquickcontrols2basicstyleplugind.dll -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/QtQuick/Templates/qmldir -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/QtQuick/Templates/qtquicktemplates2plugind.dll -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/QtQuick/Controls/impl/qmldir -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/QtQuick/Controls/impl/qtquickcontrols2implplugind.dll -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/QtQuick/Controls/Basic/impl/qmldir -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/QtQuick/Controls/Basic/impl/qtquickcontrols2basicstyleimplplugind.dll -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/QtQuick/Shapes/qmldir -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/QtQuick/Shapes/qmlshapesplugind.dll -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/Qt/labs/qmlmodels/qmldir -- Installing: E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/qml/Qt/labs/qmlmodels/labsmodelsplugind.dll -- Writing E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/bin/qt.conf -- Running Qt deploy tool for E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/build/debug/appqml-cpp-example.exe in working directory 'E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug' 'D:/Qt/6.9.3/msvc2022_64/bin/windeployqt.exe' 'E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/build/debug/appqml-cpp-example.exe' '--dir' '.' '--libdir' 'bin' '--plugindir' 'plugins' '--qml-deploy-dir' 'qml' '--translationdir' 'translations' '--force' '--qtpaths' 'D:/Qt/6.9.3/msvc2022_64/bin/qtpaths6.exe' 'qml/QtQuick/qtquick2plugind.dll' 'qml/QtQml/qmlplugind.dll' 'qml/QtQml/Models/modelsplugind.dll' 'qml/QtQml/WorkerScript/workerscriptplugind.dll' 'qml/QtQuick/Controls/Basic/qtquickcontrols2basicstyleplugind.dll' 'qml/QtQuick/Templates/qtquicktemplates2plugind.dll' 'qml/QtQuick/Controls/impl/qtquickcontrols2implplugind.dll' 'qml/QtQuick/Controls/Basic/impl/qtquickcontrols2basicstyleimplplugind.dll' 'qml/QtQuick/Shapes/qmlshapesplugind.dll' 'qml/Qt/labs/qmlmodels/labsmodelsplugind.dll' E:\work\024_Qt\QtAcademy\how-to-expose-c-to-qml\build\debug\appqml-cpp-example.exe 64 bit, debug executable [QML] Adding in plugin type generic for module: Qt6Gui Adding in plugin type iconengines for module: Qt6Gui Adding Qt6Svg for qsvgicond.dll from plugin type: iconengines Adding in plugin type imageformats for module: Qt6Gui Adding in plugin type networkinformation for module: Qt6Network Adding in plugin type platforms for module: Qt6Gui Adding in plugin type qmltooling for module: Qt6Qml Adding in plugin type tls for module: Qt6Network Skipping plugin qopensslbackendd.dll. Use -force-openssl or specify -openssl-root if you want to use it. Direct dependencies: Qt6Core Qt6Gui Qt6LabsQmlModels Qt6Network Qt6OpenGL Qt6Qml Qt6QmlMeta Qt6QmlModels Qt6QmlWorkerScript Qt6Quick Qt6QuickControls2 Qt6QuickControls2Basic Qt6QuickControls2BasicStyleImpl Qt6QuickControls2Impl Qt6QuickShapes Qt6QuickTemplates2 All dependencies : Qt6Core Qt6Gui Qt6LabsQmlModels Qt6Network Qt6OpenGL Qt6Qml Qt6QmlMeta Qt6QmlModels Qt6QmlWorkerScript Qt6Quick Qt6QuickControls2 Qt6QuickControls2Basic Qt6QuickControls2BasicStyleImpl Qt6QuickControls2Impl Qt6QuickShapes Qt6QuickTemplates2 To be deployed : Qt6Core Qt6Gui Qt6LabsQmlModels Qt6Network Qt6OpenGL Qt6Qml Qt6QmlMeta Qt6QmlModels Qt6QmlWorkerScript Qt6Quick Qt6QuickControls2 Qt6QuickControls2Basic Qt6QuickControls2BasicStyleImpl Qt6QuickControls2Impl Qt6QuickShapes Qt6QuickTemplates2 Qt6Svg Updating Qt6Cored.dll. Updating Qt6Guid.dll. Updating Qt6LabsQmlModelsd.dll. Updating Qt6Networkd.dll. Updating Qt6OpenGLd.dll. Updating Qt6Qmld.dll. Updating Qt6QmlMetad.dll. Updating Qt6QmlModelsd.dll. Updating Qt6QmlWorkerScriptd.dll. Updating Qt6Quickd.dll. Updating Qt6QuickControls2d.dll. Updating Qt6QuickControls2Basicd.dll. Updating Qt6QuickControls2BasicStyleImpld.dll. Updating Qt6QuickControls2Impld.dll. Updating Qt6QuickShapesd.dll. Updating Qt6QuickTemplates2d.dll. Updating Qt6Svgd.dll. Updating opengl32sw.dll. Updating d3dcompiler_47.dll. Updating dxcompiler.dll. Updating dxil.dll. Updating concrt140d.dll. Updating msvcp140_1d.dll. Updating msvcp140_2d.dll. Updating msvcp140d.dll. Updating msvcp140d_atomic_wait.dll. Updating msvcp140d_codecvt_ids.dll. Updating vccorlib140d.dll. Updating vcruntime140_1d.dll. Updating vcruntime140_threadsd.dll. Updating vcruntime140d.dll. Creating directory E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/plugins/generic. Updating qtuiotouchplugind.dll. Creating directory E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/plugins/iconengines. Updating qsvgicond.dll. Creating directory E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/plugins/imageformats. Updating qgifd.dll. Updating qicod.dll. Updating qjpegd.dll. Updating qsvgd.dll. Creating directory E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/plugins/networkinformation. Updating qnetworklistmanagerd.dll. Creating directory E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/plugins/platforms. Updating qwindowsd.dll. Creating directory E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/plugins/qmltooling. Updating qmldbg_debuggerd.dll. Updating qmldbg_inspectord.dll. Updating qmldbg_locald.dll. Updating qmldbg_messagesd.dll. Updating qmldbg_natived.dll. Updating qmldbg_nativedebuggerd.dll. Updating qmldbg_previewd.dll. Updating qmldbg_profilerd.dll. Updating qmldbg_quickprofilerd.dll. Updating qmldbg_serverd.dll. Updating qmldbg_tcpd.dll. Creating directory E:/work/024_Qt/QtAcademy/how-to-expose-c-to-qml/install/debug/plugins/tls. Updating qcertonlybackendd.dll. Updating qschannelbackendd.dll. Creating translations... Creating qt_ar.qm... Creating qt_bg.qm... Creating qt_ca.qm... Creating qt_cs.qm... Creating qt_da.qm... Creating qt_de.qm... Creating qt_en.qm... Creating qt_es.qm... Creating qt_fa.qm... Creating qt_fi.qm... Creating qt_fr.qm... Creating qt_gd.qm... Creating qt_he.qm... Creating qt_hr.qm... Creating qt_hu.qm... Creating qt_it.qm... Creating qt_ja.qm... Creating qt_ka.qm... Creating qt_ko.qm... Creating qt_lg.qm... Creating qt_lv.qm... Creating qt_nl.qm... Creating qt_nn.qm... Creating qt_pl.qm... Creating qt_pt_BR.qm... Creating qt_ru.qm... Creating qt_sk.qm... Creating qt_sv.qm... Creating qt_tr.qm... Creating qt_uk.qm... Creating qt_zh_CN.qm... Creating qt_zh_TW.qm... I finally got it to run. [image: 9c56ecc9-de94-4227-ba95-0acc6dbba702.png] Thank you for your comments so far. I would like to close this topic as resolved.
  • Output message from Qt 6.10.0 when debugging code

    Unsolved
    5
    0 Votes
    5 Posts
    170 Views
    PerdrixP
    I develop under Visual Studio for my application normally, and had set the application manifest for High DPI awareness. It appears that if you do this and then call SetProcessDpiAwarenessContext() it will fail as above. Totally weird! What's embarrassing is I already reported this here some long while ago and had forgotten!!! https://forum.qt.io/topic/141236/unexpected-message-in-debug-log Blush! David
  • How to add a QCompleter to a Qtreeview

    Unsolved
    2
    0 Votes
    2 Posts
    79 Views
    jeremy_kJ
    @electric-dev said in How to add a QCompleter to a Qtreeview: completar=["ABB","auto","avellana","asturia"] completer = QCompleter(completar) ... completer.setModel(QFileSystemModel(completer)) ... self.my_model=QStandardItemModel(self,completer) self.setModel(self.my_model) These three sections of code are mutually incompatible. QCompleter supports a single model at a time. In addition, the completer needs to be set on an input widget such as QLineEdit, or queried as described in the documentation.