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.7k Topics 35.8k Posts
  • My terminal is currently displaying a blank screen,

    Moved Unsolved
    8
    0 Votes
    8 Posts
    481 Views
    cristian-adamC
    @873578156 I've fixed the bug yesterday and merged the fix today, check a Qt Creator 18.0.2 snapshot https://download.qt.io/snapshots/qtcreator/18.0/18.0.2/ tomorrow.
  • Raspberry Trixie und Qt Creator

    Solved
    14
    0 Votes
    14 Posts
    454 Views
    SGaistS
    @Fuxi how are you starting Qt Creator in that case ?
  • Configure VSCode to use Qt Kits

    Moved Unsolved
    1
    0 Votes
    1 Posts
    33 Views
    No one has replied
  • Qt Creator crash on macOS when editing UI file in the designer

    Unsolved
    3
    0 Votes
    3 Posts
    120 Views
    S
    @aha_1980 I don't believe so. In my case it was Qt Creator that crashed and in the case you linked to it was clangd.
  • no header providing "Q_OBJECT" is directly included

    Moved Unsolved
    5
    0 Votes
    5 Posts
    135 Views
    msauer751M
    Hi @SGaist cmake. And with CMakeLists.txt of the project cmake_minimum_required(VERSION 3.16) set(APP "qt_wm") set(VER "1.0") message("CMAKE fuer project: " ${APP}) project(${APP} VERSION ${VER} LANGUAGES CXX) #set(CMAKE_BINARY_DIR "${CMAKE_SOURCE_DIR}/_Build/Bin/${CMAKE_SYSTEM_NAME}/${CMAKE_BUILD_TYPE}") #set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) #set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) #set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set(LIBTYP "SHARED") set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) #set(CMAKE_CXX_CLANG_TIDY clang-tidy) if (WIN32) set(SSLDIR "E:/Qt/Tools/OpenSSLv3/Win_x64/bin/") set(SSLLIB1 "libcrypto-3-x64.dll") set(SSLLIB2 "libssl-3-x64.dll") message(" WIN32: SSLDIR=" ${SSLDIR}) message(" WIN32: SSLLIB=" ${SSLLIB1} " " ${SSLLIB2}) elseif (UNIX) #set(CMAKE_PREFIX_PATH "/opt/Entwicklung/Qt/6.10.1/gcc_64/") endif() add_subdirectory(library/lib-datad) add_subdirectory(library/lib-db) add_subdirectory(library/lib-geo) add_subdirectory(library/lib-jsonrpc) add_subdirectory(wm-lib) add_subdirectory(wm-ui) and of the subproject: cmake_minimum_required(VERSION 3.16) set(LIB "datad") set(LIBDEF "LIBDATAD_LIBRARY") message("CMAKE fuer project: lib" ${LIB}) project(lib-${LIB} VERSION 1.0.0 LANGUAGES CXX) find_package(Qt6 COMPONENTS Core REQUIRED) find_package(Qt6 COMPONENTS Qml REQUIRED) include_directories("source/") include_directories("source/helper") set(SOURCES source/data-decorator.cpp source/bool-decorator.cpp source/float-decorator.cpp source/int-decorator.cpp source/string-decorator.cpp source/enumerator-decorator.cpp source/dropdown.cpp source/helper/dropdown-value.cpp source/helper/koordinaten.cpp source/string_bool-decorator.cpp source/koordinaten-decorator.cpp source/attribute-decorator.cpp source/lib-datad_global.h source/data-decorator.h source/bool-decorator.h source/float-decorator.h source/int-decorator.h source/string-decorator.h source/enumerator-decorator.h source/dropdown.h source/helper/dropdown-value.h source/string_bool-decorator.h source/koordinaten-decorator.h source/attribute-decorator.h source/helper/koordinaten.h ) add_library(${LIB} ${LIBTYP} ${SOURCES}) target_link_libraries( ${LIB} Qt6::Core ) target_compile_definitions(${LIB} PRIVATE ${LIBDEF}) target_compile_definitions(${LIB} PUBLIC "QT_DEPRECATED_WARNINGS")
  • Qt Designer: QGroupBox not showing its entire title

    Unsolved qgroupb title bar
    7
    0 Votes
    7 Posts
    109 Views
    JonBJ
    @kitebuggy I saw your code last night and that it was missing a layout on the central widget of the main window but wasn't sure whether that would produce the behaviour you see. So that you know: look at @Christian-Ehrlicher's two screenshots. The first one is your original code. Look at the Object Explorer pane at the right: notice that centralWidget has a "red no-entry sign" on it. Whenever you see that in Designer it indicates you are missing a layout on that widget. See how in the second screenshot that has disappeared. So look out for that when designing. (Having said this: I'm not quite sure what is going on with your QGroupBox widget: that still shows a "red no-entry" even though you have added an explicit QVBoxLayout on it. I tend not to add explicit layout objects unless I really need them, you can also set a layout on a widget by right-clicking on it and selecting Layout > (once it has at least one child widget, it's disabled before that) and I do that whenever possible. i am still not sure whether that way or adding an explicit layout as a child result in the same code/behaviour....)
  • Creator debugging and forcing step over certain functions

    Unsolved
    11
    0 Votes
    11 Posts
    174 Views
    JonBJ
    @cristian-adam I didn't realise this feature seems to be unusual. I did spend years with MSVC/VS so I guess I got accustomed to whatever it has. I have had a quick search, not exhaustive. I find that what I recall was written as [DebuggerStepThrough] someFunctionDefinition() {} It may be this was for C# and managed code, like the weird C++ they had for that. Maybe it wasn't for plain C++, not sure. I also see VS has a dedicated setting to auto-"skip over properties/getters/setters". I realise this is not so easy with C++, but it's often all those standard getters/setters we really want to step over. It's this sort of feature which made VS really good. Just saying. So maybe I was spoiled in C# days with the simple [DebuggerStepThrough] etc. code annotations and this isn't so common. Surprises me, as it's so basic to debugging experience. I have code which may go getterInClass1()->getterInClass2()->getterInClass3()->doSomething(); When I step into --- coz I'm going to want to see what's in doSomething() --- it's then about 6 key presses to get into and out of each object getter, real pain. If I just used public variables instead of getters this would be so simple. But you wouldn't want me to do that just for debugging, would you...? I end up doing: Foo *ptr(getterInClass1()->getterInClass2()->getterInClass3()); ptr->doSomething(); just so I can step over the first line and then stick to stepping in, but I shouldn't have to do this just for the debugger, should I?
  • Qt Creator plugin - how to modify current editor margins

    Unsolved plugin c++ qt creator
    6
    0 Votes
    6 Posts
    605 Views
    SebastianMS
    My change to center editor content is on Qt gerrit. https://codereview.qt-project.org/c/qt-creator/qt-creator/+/701362 Let's see how Qt devs react to this.
  • How do we fix "C and C++ compiler paths differ. C compiler may not work."

    Unsolved
    14
    0 Votes
    14 Posts
    9k Views
    C
    Thanks Ronel_qtmaster, that was exactly the problem. So in Qt Creator, for my project, via [Manage Kits...], I removed the two existing entries pointing to clang, and the only entry remaining was GCC (x86 64bit at "/bin/gcc" with type GCC Below 'Manual' I added an entry named "G++", pointing to "bin/g++" Then the project was automatically refreshed with this new information. And after a new Build > Run qmake , the error had disappeared ! Thanks and happy new years eve !
  • After I changed the names of several controls, Qt Creator crashed and closed.

    Moved Unsolved
    4
    0 Votes
    4 Posts
    126 Views
    SGaistS
    Hi, From the looks of it: I[03:28:45.275] <-- reply(2) PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var LLVM_SYMBOLIZER_PATH to point to it): You seem to have found a way to make llvm crash.
  • QTCreator18.0.1 unidentifiable Chinese code in ubuntu18.04

    Unsolved
    7
    0 Votes
    7 Posts
    148 Views
    Z
    @aha_1980 ok,I gave it a try and it was normal,thanks.
  • QtCreator 17 + Qt6.10.1 + Raspberry Pi => No executable file was specified

    Solved
    2
    0 Votes
    2 Posts
    94 Views
    M
    Solution was to install gbdserver on the Raspberry Pi.
  • QtCreator Multiple Help Documentation Versions

    Unsolved
    3
    0 Votes
    3 Posts
    100 Views
    KenAppleby 0K
    @Chris-Kawa Thanks, that's very helpful. The Maintenance Tool with --show-virtual-components shows documentation and examples, as you say. Very useful. My Qt/Docs folder contains only a 6.10.1 subfolder. But I continue to get 6.8.5 docs offered. My Maintenance Tool, when set to show "Latest supported releases" lists 6.10.1, 6.9.3, 6.8.3, 6.7.3, 6.5.3 which seems wrong because the 6.8 version should be 6.8.5 I think. All except 6.10.1 are empty. I suspect my Maintenance Tool installation is broken, so I will try reinstalling that.
  • Qt Creator: Ordering of debug/release builds?

    Solved
    7
    0 Votes
    7 Posts
    236 Views
    cristian-adamC
    @KH-219Design said in Qt Creator: Ordering of debug/release builds?: @cristian-adam am I understanding correctly that the key insight (or the key cmake feature that unlocks the possibility) is to use ExternalProject ? Only if you need the Visual Studio CMake generator. If you are using Ninja, then add_subdirectory is enough.
  • getting non-simply named items in Header and Source Files in the project tree (Cmake)

    Unsolved
    2
    0 Votes
    2 Posts
    100 Views
    cristian-adamC
    @janhec have a look at CMake's source_group which is also used by Qt Creator to organize the project view.
  • Qtcreator 13.0.0 generates empty compile_commands.json for clangd

    Unsolved
    3
    0 Votes
    3 Posts
    122 Views
    Z
    You probably cannot do anything about that directly, and I'm not even sure if or how Qt Creator could find out what to write into the commands for this. A possible workaround to still be able to sensibly work with the project in Qt Creator might be to let CMake generate the compilation database, and then use the Compilation Database plugin (disabled by default, I think, so you might need to turn that on first) to directly open the project as a compilation database project instead of a CMake project https://doc.qt.io/qtcreator/creator-how-to-use-compilation-databases.html
  • Installed library is not seen in Qt Creator

    Solved
    4
    0 Votes
    4 Posts
    113 Views
    SGaistS
    I encourage you to go to the QSerialPort documentation. It's a the top of the page. Installing a module and making use of it in your project are two very different things. There's no reason for the installer nor the maintenance tool to go affect your projects. The "adding a library" part is for non Qt modules.
  • Local LLM-assisted text completion for Qt Creator

    10
    3 Votes
    10 Posts
    2k Views
    SGaistS
    @cristian-adam you forgot to say please ;-)
  • Qt Creator plugin - how to hide output panes

    Solved
    6
    0 Votes
    6 Posts
    280 Views
    SebastianMS
    Thank you. That covers case action.setChecked("QtCreator.ToggleLeftSidebar", false) - so I can hide sidebars. Similary with action.setChecked(""QtCreator.Modes.IconsOnly", true).
  • qDebug() doesn't show messages in Qt Creator/Application Output

    Moved Solved
    44
    0 Votes
    44 Posts
    2k Views
    JonBJ
    @cristian-adam Very interesting, thank you. It turns out there is some vsdbg.exe, which I take to be the actual debugger as its own executable. Which you can "drive", if you know what to send it. I didn't care about DWARF, PDB etc. I was interested in which debuggers allow a host to "talk" to them and vice versa, send it commands, read variables, etc. Which is what Creator will require. I know gdb can do it. I didn't know there was a standalone executable for the debugger from VS, I thought it was a built in.