Skip to content

General and Desktop

This is where all the desktop OS and general Qt questions belong.
83.7k Topics 458.1k Posts
  • Linking external .dll with CMake

    Solved
    3
    0 Votes
    3 Posts
    113 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
    497 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
    116 Views
    SGaistS
    Hi and welcome to devnet, Which version of Qt Creator is it ? On which platform ?
  • This topic is deleted!

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

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

    Unsolved
    7
    0 Votes
    7 Posts
    399 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
    305 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
    214 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
    98 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.
  • 0 Votes
    2 Posts
    97 Views
    JKSHJ
    Hi @jason1122, and welcome! Do you still see the memory leak with Qt 6.10.0?
  • Can not upload files to QT Forum

    Solved
    8
    1 Votes
    8 Posts
    307 Views
    A
    I copy pasted it.
  • Create a secure Grpc Channel without specifying certificates

    Unsolved
    11
    0 Votes
    11 Posts
    2k Views
    J
    @talksik Thanks for that answer. I spent a few hours trying to figure out why my QGrpc client wouldn't connect using SSL. Calling the below on my SSLConfiguration fixed it. setAllowedNextProtocols({ "h2" }). I agree the documentation isn't great for this, which is a shame.
  • how to add description properties

    Unsolved
    9
    0 Votes
    9 Posts
    733 Views
    T
    @hskoglund I just tried using these 2 in our .pro file . The Qt Creator editor didnt recognize them (not color coded like other keywords in the pro file) and when I built the copyright was still not in the exe details. Did these show up in a Qt 6. version or were they available in Qt 5.12.11 (what we're currently on) Google said they should be available in 5 though.
  • QAbstractListModel with base and derived class

    Solved
    5
    0 Votes
    5 Posts
    137 Views
    JonBJ
    @Redman said in QAbstractListModel with base and derived class: I do not see the benefit here. Please elaborate. To me it looks the same, just switched positions of A and B property lookup. 100% yes. And as I wrote as a consequence: This would avoid doing two data lookups and would allow for a genuine null value in either case. So two benefits :)
  • QT5.9 Dialog stays on all workspace

    Unsolved
    5
    0 Votes
    5 Posts
    178 Views
    F
    @jsulm The problem was solved, I mainly want to know the reason. Thank you~~
  • Nested ScrollView

    Unsolved
    2
    0 Votes
    2 Posts
    126 Views
    Ronel_qtmasterR
    @nilsl Your code is a bit wrong. As you want to implement Nested ScrollView, the second scrollview shouldn't be inside ListView's delegate. It has nothing to do with the Listview ,nor it's delegate. In fact Listview itself has scrolling behaviour.Try something like this import QtQuick 6.0 import QtQuick.Controls 6.0 ApplicationWindow { visible: true width: 640 height: 480 title: "Nested ScrollView Example" // Outer ScrollView for vertical scrolling ScrollView { anchors.fill: parent clip: true contentHeight: column.height Column { id: column width: parent.width // Example content for the outer scroll view Rectangle { width: parent.width height: 200 color: "lightgray" Text { text: "Outer Scrollable Content" anchors.centerIn: parent } } Rectangle { width: parent.width height: 100 color: "lightblue" Text { text: "More Outer Content" anchors.centerIn: parent } } // Inner ScrollView for horizontal scrolling ScrollView { width: parent.width height: 150 contentWidth: 1000 // Make it wider than the parent horizontalAlignment: ScrollView.AlignLeft Row { spacing: 10 Rectangle { width: 200 height: 100 color: "lightgreen" } Rectangle { width: 200 height: 100 color: "lightcoral" } Rectangle { width: 200 height: 100 color: "lightsalmon" } Rectangle { width: 200 height: 100 color: "lightpink" } } } Rectangle { width: parent.width height: 300 color: "lightyellow" Text { text: "Final Outer Content" anchors.centerIn: parent } } } } }
  • install QT 6.6.0 / Macos Monterey

    Unsolved
    2
    0 Votes
    2 Posts
    70 Views
    SGaistS
    Hi, One possible way might be the aqtinstall project.
  • QFileDialog::getOpenFileName Fails to Display Dialog with Native macOS

    Unsolved
    5
    1 Votes
    5 Posts
    658 Views
    SGaistS
    Quoting the reasons from the ticket: The app is missing a bundle identifier, which apparently affects whether the OS shows native file dialogs. Set MACOSX_BUNDLE_GUI_IDENTIFIER to fix this. The reason qt_add_executable works is because it automatically sets MACOSX_BUNDLE_GUI_IDENTIFIER if not set.
  • How to make a round corner for the qwebengineview?

    Unsolved
    14
    0 Votes
    14 Posts
    469 Views
    JonBJ
    @Bonnie said in How to make a round corner for the qwebengineview?: Just because someone posts frequently it doesn't necessarily mean he/she is good :) I wasn't expecting good, these are just basics... You are (always) good! :)