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
  • Creator debugging and forcing step over certain functions

    Unsolved
    13
    0 Votes
    13 Posts
    196 Views
    JonBJ
    Yes I understand. But that is not convenient when you will want to step into each one because you don't know what you might be looking for. Sequences like e.g.: getterA()->getterB()->method1(); getterC()->getterD()->method2(); getterA()->getterB()->method3(); etc.... are simply a pain in the ass to step into. I know it's "filthy", but I am taking to writing the underlying class member variable (within its class body) instead of going via the getter just to make debugging less painful (coding is for my own purposes, I wouldn't do that in other circumstances). As I wrote, when I did C# I know I found debugging/VS much more pleasant. I had not appreciated that e.g. [DebuggerStepThrough] someFunctionDefinition() {} was C# only. Obviously C# combines debugger directives with code because it can do what it likes. I had assumed in C++ I would be able to "annotate" with some compiler-debugger attribute to achieve similar. It looks like they have a strict rule that any attributes must be to do with compilation only, not debugging, as gcc and gdb are treated as quite separate entities. I guess I need gcc to be willing to put in some directives/hints for debugging but that is not going to happen?
  • 0 Votes
    1 Posts
    21 Views
    No one has replied
  • My terminal is currently displaying a blank screen,

    Moved Unsolved
    8
    0 Votes
    8 Posts
    492 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
    472 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
    35 Views
    No one has replied
  • Qt Creator crash on macOS when editing UI file in the designer

    Unsolved
    3
    0 Votes
    3 Posts
    130 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
    141 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
    120 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....)
  • Qt Creator plugin - how to modify current editor margins

    Unsolved plugin c++ qt creator
    6
    0 Votes
    6 Posts
    613 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
    133 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
    151 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
    237 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).