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.7k Posts
  • How to configure QTCreator to use bash-language-server?

    Unsolved
    2
    0 Votes
    2 Posts
    136 Views
    aha_1980A
    Hi @Tyler-Shellberg, on my Ubuntu Linux 24 I installed the bash-language-server with snap and then setup the language client as follows: [image: 43ae0eee-6f32-44de-9337-2b40e6b5595a.png] and this works for me. If you have to set sh.exe as executable, then please try to add start as argument. Regards
  • Qt Creator plugin - how to modify current editor margins

    Unsolved plugin c++ qt creator
    4
    0 Votes
    4 Posts
    330 Views
    SebastianMS
    Still, I can't find way to modify TextEditor margins. Core::IEditor *currentEditor = Core::EditorManager::currentEditor(); TextEditor::BaseTextEditor *textEditor = qobject_cast<TextEditor::BaseTextEditor*>(currentEditor); TextEditor::TextEditorWidget * editorWidget = textEditor->editorWidget(); //how to do it? Tried casting edditorWidget to class CustomTextEditorWidget : public TextEditor::TextEditorWidget with custom virtual int extraAreaWidth(int *markWidthPtr = nullptr) const override. qobject_cast fails, after static_cast there's exception. Accessor approach class TextEditorWidgetAccessor : public TextEditor::TextEditorWidget { public: static void setMargins(TextEditor::TextEditorWidget *widget, int left, int top, int right, int bottom) { // Cast to accessor to get access to protected method TextEditorWidgetAccessor *accessor = static_cast<TextEditorWidgetAccessor*>(widget); accessor->setViewportMargins(left, top, right, bottom); } }; .... TextEditorWidgetAccessor::setMargins(editorWidget, 300, 0, 0, 0); doesn't change viewportMargins - before and after setting they return the same original value.
  • Window 11, Qt 6.8.0 - Errors in QtCreator when trying to build a project with Cmake

    Solved
    3
    0 Votes
    3 Posts
    680 Views
    S
    I suddenly remembered to solve this post today, sorry for being so late. The whole reason is a silly mistake. Some crucial variables were missing from my environment variables. That's it! %SystemRoot%; %SystemRoot%\System32; %SystemRoot%\System32\WindowsPowerShell\v1.0\; %SystemRoot%\System32\Wbem;
  • avoid to tick shadow build to any new project I create

    Moved Unsolved
    1
    0 Votes
    1 Posts
    116 Views
    No one has replied
  • Any way to pause clangd in Qt Creator?

    Unsolved
    5
    1 Votes
    5 Posts
    544 Views
    andrA
    https://bugreports.qt.io/ is also open for feature requests like this
  • QtCreator 17.0.2 Font Issue in Qt Creator Documentation

    Unsolved
    4
    0 Votes
    4 Posts
    248 Views
    Z
    You can check if switching to the "QTextBrowser" based backend makes a difference: Edit > Preferences > Help > General > Viewer Backend > QTextBrowser
  • Run Settings -> Executable and Working Directory

    Moved Unsolved
    6
    0 Votes
    6 Posts
    299 Views
    JonBJ
    @JacobNovitsky Ah. Well if that maintains whatever you want for target executable/path then write something to edit it? It's an XML file, isn't it? How can I generate it with Ubuntu command line or with Qt Ctreator interface (explictily) If that is not available then can't you write something to make the necessary update(s)?
  • Qt Creator, clangd, CMake and CUDA

    Unsolved
    3
    0 Votes
    3 Posts
    431 Views
    A
    The project I'm using QtCreator with is Tempus https://github.com/asenzz/tempus-core and any of the cu files located in SVRRoot/OnlineSVR/src/*.cu are giving me the errors as described here https://forum.qt.io/topic/3042/moved-qtcreator-and-cuda-cu-files/4
  • [Moved] qtcreator and cuda .cu files

    4
    0 Votes
    4 Posts
    7k Views
    A
    When I try to open CUDA .cu files I'm seeing many errors in my project such are the following: /home/zarko/repo/tempus/SVRRoot/OnlineSVR/src/oemd_coefficient_search_impl.cu:44: error: In template: no type named 'type' in 'boost::log::sources::aux::inherit_features<boost::log::sources::basic_logger<char, boost::log::sources::severity_logger_mtboost::log::trivial::severity_level, boost::log::sources::multi_thread_modelboost::log::aux::light_rw_mutex>, boost::log::sources::features<boost::log::sources::severityboost::log::trivial::severity_level>>' /home/zarko/repo/tempus/SVRRoot/OnlineSVR/src/oemd_coefficient_search_impl.cu:44: In instantiation of template class 'boost::log::sources::severity_logger_mtboost::log::trivial::severity_level' requested here /home/zarko/repo/tempus/SVRRoot/OnlineSVR/src/oemd_coefficient_search_impl.cu:44: error: No viable overloaded '=' /home/zarko/repo/tempus/SVRRoot/OnlineSVR/src/oemd_coefficient_search_impl.cu:44: error: Cast from pointer to smaller type 'boost::format' (aka 'int') loses information /home/zarko/repo/tempus/SVRRoot/OnlineSVR/src/oemd_coefficient_search_impl.cu:44: error: Invalid operands to binary expression ('boost::format' (aka 'int') and 'thread::id') /home/zarko/repo/tempus/SVRRoot/OnlineSVR/src/oemd_coefficient_search_impl.cu:298: error: No member named 'open_record' in 'boost::log::sources::severity_logger_mtboost::log::trivial::severity_level' I don't see the errors when opening CPP files. I suspect the wrong GCC version compiler is used when parsing .cu files.
  • Navigate to header in build dir instead of the source tree

    Unsolved
    5
    0 Votes
    5 Posts
    780 Views
    Aleksey_KA
    No, still happens.
  • cmake how to set multi QML_IMPORT_PATH?it does not work.

    Solved
    3
    0 Votes
    3 Posts
    200 Views
    Q
    it's my mistake , i set the path in another place. sorry.
  • Why my project is set to aarch64 by default?

    Unsolved
    2
    0 Votes
    2 Posts
    186 Views
    SGaistS
    Hi, Not knowing what you installed, how you installed it and what you are configured is to few details to be able to help you.
  • Compile and build project on remote machine

    Unsolved
    6
    0 Votes
    6 Posts
    394 Views
    S
    @montanaviking said in Compile and build project on remote machine: I did add a remote debugger too but that made no difference. Did set the remote debugger for the specific kit you are using? Also running sans the debugger gives errors: qt.qpa.xcb: could not connect to display localhost:15.0 qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin. qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Did you use ssh -X to do X-forwarding for your ssh connection?
  • unable to show pixmap using qrc file

    Solved
    7
    0 Votes
    7 Posts
    305 Views
    Y
    ohhhh i see. I added it to the CMakeLists.txt and now it works as expected. Thank you :D
  • Issue with Qt Creator crashing on Windows 10

    Unsolved
    4
    0 Votes
    4 Posts
    287 Views
    SGaistS
    @aha_1980 Damn ! I looked for the Windows version and somehow I read 10 in place of 7...
  • Qt Creator Plugin License (Qt Company GPL Exception 1.0)

    Unsolved
    5
    0 Votes
    5 Posts
    369 Views
    W
    Thank you both, I will clarify the detail again with Qt Company.
  • Executable from sh file

    Moved Unsolved
    11
    0 Votes
    11 Posts
    1k Views
    J
    [image: 509edc5c-5bb3-4cce-8d12-e942b334a408.png]
  • 0 Votes
    1 Posts
    65 Views
    No one has replied
  • Qt Creator: Ordering of debug/release builds?

    Unsolved
    1
    0 Votes
    1 Posts
    60 Views
    No one has replied
  • Qt Creator: Enforce a release-only build in the qmake .pro file?

    Solved
    2
    0 Votes
    2 Posts
    128 Views
    R
    I found a usable workaround, but am open to other suggestions! The project file Libs.pro builds the three subprojects, one per library. I just wrapped everything in a test for debug: CONFIG(release,debug|release) { TEMPLATE = subdirs PROJECT_DIR = $$clean_path($${top_srcdir}/../) THIRD_DIR = $${PROJECT_DIR}/3rd_party SUBDIRS = \ $${THIRD_DIR}/A/A_lib.pro \ $${THIRD_DIR}/B/B_lib.pro \ $${THIRD_DIR}/C/C_lib.pro } else { error("Only release builds are allowed for these libraries! Please close Qt Creator, delete the 'Libs.pro.user' file and check your kit selection carefully.") } Works for me.