Skip to content

Qt Creator and other tools

Have a question about Qt Creator, our cross-platform IDE, or any of the other tools? Ask here!
7.6k Topics 35.4k Posts
  • How can I force QtCreator to use clang/llvm instead of gcc

    Solved
    5
    0 Votes
    5 Posts
    513 Views
    C
    Just an addendum to this post: I closed Qt Creator after the above post. When I opened it again today to test the module functions, Qt tried to revert everything to GCC. The kits I had removed had come back, the default compiler was set to /usr/bin/gcc and every time I edited a file I got a dialog box asking if I wished to change back to GCC. I had to go into the build settings and manually edit the compiler line and set it back to clang and then the dialog went away. Am I really going to have to do this every time I want to use clang? Hopefully, GCC15.1 will be available soon on Homebrew and it will recognize modules and vcpkg packages properly!
  • How to get Lua code completion?

    Unsolved lua syntax highligh
    2
    0 Votes
    2 Posts
    257 Views
    S
    There also seems no documentation at all. :( [image: 4aa812bc-ab00-47c2-bf6b-5baf97d26609.png]
  • Error trying to use modules, import function unknown?

    Solved
    8
    0 Votes
    8 Posts
    714 Views
    C
    @SimonSchroeder That's a very important point! I have solved my immediate problems like this: I deleted GCC-13 from the kits/compilers. I used sudo update-alternatives to make /usr/bin/gcc point to my GCC14.2 homebrew installation. That worked partially but GCC-14.2 doesn't handle modules properly and nor does it reliably handle vcpkg packages! (I have been using clang-19.1 with VS Code for the project/tutorials mentioned above and that does work) I struggled to get QtCreator to use the clang compiler but at last found the solution, albeit using a sledgehammer to crack a nut! Delete GCC entries from the Kits/compilers section. My Qt installation already found clang as it was in my path. Added 'export $CXX=clang to my .bashrc. Not sure how necessary this is but it was mentioned in an error message. 3)Added the line "set(CMAKE_CXX_COMPILER clang++)" to CMakeLists before "project(helloClang LANGUAGES CXX)" Now my little helloClang compiles with the clang compiler. I added a vcpkg statement and the fmt library with the appropriate lines in CMakeLists - and it works! I haven't had time to try out modules yet but I'm sure they will work as well. I don't think it was really necessary to delete the GCC kits, probably setting the compiler in CMakeLists may be enough. I will continue experimenting to see what works. None of this is necessary in VS Code, it's a simple drop-down menu to select the compiler when configuring initially. Also, there are no entries in the CMakeLists file nor environmental variables set. An equivalent in QtCreator would be to just go to the kits page and select the wanted compiler and click Apply/OK but this does not work. I'm just pleased that I will be able to use modules and vcpkg packages from QtCreator now.
  • Data Breakpoints being ignored?

    Unsolved
    5
    0 Votes
    5 Posts
    377 Views
    S
    @SGaist No, its not. Also, the OP is asking for Linux anyway. I just assumed that this might be something that other debuggers do as well.
  • Layout issue

    Moved Solved
    3
    0 Votes
    3 Posts
    256 Views
    G
    @SuhasKrishanamurthy Big big thanks Brother .
  • Cannot create object of QNetworkAccessManager

    Solved
    7
    0 Votes
    7 Posts
    442 Views
    jsulmJ
    @YamiTheWitch said in Cannot create object of QNetworkAccessManager: Doesn't Qt automatically change the cmake file? Qt is a C++ framework. QtCreator would be responsible for the build tools. But it would have to parse your code to figure out what modules you're using to and them to CMakeLists.txt file then.
  • Command line arguments working in terminal but not through IDE

    Solved
    5
    0 Votes
    5 Posts
    464 Views
    JonBJ
    @A123 So the "arguments" box does let you include > file? I am surprised, interesting.
  • Cannot display contents of QMap in debugger in Visual Studio 2022 (Qt 6.9.0)

    Moved Unsolved
    2
    0 Votes
    2 Posts
    251 Views
    K
    A development release with an updated .natvis file that supports QMap >= 6.9.0 can be downloaded here: https://download.qt.io/development_releases/vsaddin/3.4.0/ Hope that helps, if not, please head over to https://bugreports.qt.io/ and file a bug report under the 'Qt Visual Studio Tools (QTVSADDINBUG)'
  • Creator crashes at startup

    Solved
    7
    0 Votes
    7 Posts
    571 Views
    Andy314A
    Thank you for the answers. Indeed it my creator was in the old Version 10. With the newest Creator I dont get this error. other errors but, for this I make an other thread -
  • changes in qt are not realized

    Solved
    2
    0 Votes
    2 Posts
    322 Views
    atom_352A
    deleting and creating the configuration again helped
  • 0 Votes
    3 Posts
    866 Views
    E
    I am using Qt 6.8.2 / Creator 16 on Ubuntu 22.04 ; while attending an online course, I noticed that my QML Designer session did not display a States Panel at the bottom center. According to online tips, State Panel can be enabled via the View menu in Qt Creator, but it was grayed out for me. I had to uninstall (or disable) the QML Designer Plug-In (under Help -> About Plugins) and the reinstall (or enable) the QML Designer Plug-in. After doing so, the View menu was no longer grayed out (per mandatory and automatic Qt Creator restart). Hopefully, this workaround applies for others too.
  • Disable Auto Header File Completion

    Solved
    3
    0 Votes
    3 Posts
    302 Views
    Grit ClefG
    Just the case, thanks!
  • 0 Votes
    1 Posts
    118 Views
    No one has replied
  • Qt Creator 16.0.1 on Mac OS X 12.7.6 crashes....

    Unsolved
    8
    0 Votes
    8 Posts
    734 Views
    Z
    Most recent snapshots of QtC 16.0.2 and later have the fix https://download.qt.io/snapshots/qtcreator/16.0/16.0.2/
  • how to disable highlighting of blocks when mouse hovers them

    Unsolved
    2
    0 Votes
    2 Posts
    251 Views
    S
    If you're using Sublime Text, try this: Go to Preferences > Settings. Add this line: "hover_highlight_gutter": false Save and restart the editor. If the setting doesn't exist or the issue persists, it may be controlled by the theme or a plugin. In that case: Go to Preferences > Customize Theme Look for any gutter or highlight rules and remove or modify them. If you're using VS Code, disable these in your settings: "editor.guides.bracketPairs": "never", "editor.guides.highlightActiveBracketPair": false, "editor.foldingHighlight": false
  • 0 Votes
    4 Posts
    418 Views
    jsulmJ
    @lyvvvv As far as I know Visual Studio supports CMake - why not using it directly instead of sln?
  • Project ERROR: msvc-version.conf loaded but QMAKE_MSC_VER isn't set

    Unsolved
    3
    1 Votes
    3 Posts
    3k Views
    S
    for me, removing .qmake.stash in the project folder solves the problem. reference: https://stackoverflow.com/a/54318956/1074799
  • Qt Creator 16 displays indentation incorrectly

    Unsolved
    11
    0 Votes
    11 Posts
    878 Views
    aha_1980A
    Reported as https://bugreports.qt.io/browse/QTCREATORBUG-32859
  • Qt Creator MSYS2 "Cmake executable does not provide required IDE integration"

    Unsolved
    5
    0 Votes
    5 Posts
    2k Views
    A
    @orto That was the case for me too. Thanks it worked after switching back to windows-1252 (actually the issue happened when I used the git extension for the first time, I didn't explicitly change the codec in the first place).
  • Could not build lib with #include <arm_neon.h>

    Unsolved
    3
    0 Votes
    3 Posts
    362 Views
    S
    @jsulm YES,The same error