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.5k Posts
  • read and save number from sqlite

    Solved
    6
    0 Votes
    6 Posts
    1k Views
    SGaistS
    Hi, You're not opening your database and also not doing any checks to see whether your query ran successfully. Also, since you are only giving the name of the database file, it will be created in the same folder as the application unless you already provide that file.
  • Can't start C++ GUI project

    Moved Solved
    4
    0 Votes
    4 Posts
    1k Views
    T
    If you want to create classic Qt GUI application you should choose Qt Widgets Application. Or, if you are familiar with web front-end development ( particularly, JavaScript and JSON), then Qt Quick Application. In my personal opinion the latter is more preferable because it is easier, more flexible and based on W3C standarts. P.S. Reference Qt documentation is gorgeous, consider to use it instead of doubtful tutorials.
  • Qt Creator: generate Makefile for non-Qt C++ projects?

    Solved
    2
    0 Votes
    2 Posts
    2k Views
    R
    Well, I just realized that I can run qmake from a terminal and it will generate a Makefile -- it's the default behavior. :)
  • How do I tell Qt Creator which subproject is the "main" one?

    7
    1 Votes
    7 Posts
    8k Views
    SGaistS
    Yes, that one. The content will changed depending on your project.
  • qmake /bin/sh: OE_QMAKE_CXX: command not found?

    Unsolved
    11
    0 Votes
    11 Posts
    7k Views
    SGaistS
    Looks good. Did you check the makespec itself to see if there some hardcoded path ?
  • Qt Creator: checking syntax & highlighting

    Unsolved
    5
    0 Votes
    5 Posts
    1k Views
    D
    As for me, it will be great, If I can choose type of code to check (e.g. Pure-C, Pure-C++ or Qt), so, is QtCreator has any pluggable mechanism to do that?
  • Generate qdoc html file

    Moved Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    kshegunovK
    Hi, Sorry for the delay I missed the notification somehow. Anyway, it exactly as I've posted it you just set the QMAKE_DOCS with the path to the qdoc configuration file. Here's a sample; it's a module so ignore most of it take a look at the project file and the doc folder.
  • Qmake debug_and_release conflict in unix makefiles

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    B
    Thank you guys for your answers! Paul, I am already setting the DESTDIR differently for debug and release builds. Unfortunately, The piece of generated makefile I posted doesn't execute in the DESTDIR. It executes where the makefiles were generated, thus the clash in the symlink commands. But thanks for the tips! If I understand correctly, if I want to fix this, I need to build release and debug in different makefiles tree using shadow builds. This would change the structure of our projects a lot for now. I won't be able to implement that without affecting a whole bunch of other scripts relying on the current build structure. I think that qmake should have used a unique tmp folder for performing this symlink creation operation. This really looks like a bug in the unix makefiles generation for shared objects. Thank anyway guys!
  • Tweaking code refactoring options in Qt Creator

    Unsolved
    6
    0 Votes
    6 Posts
    2k Views
    Pradeep KumarP
    @Robert-Hairgrove Honestly i have never tried that. As mentioned by @mrjj should look into the source.
  • How does QMake process .prl files?

    Unsolved
    3
    0 Votes
    3 Posts
    4k Views
    Paul ColbyP
    Not sure, but I'd suggest some parenthesis. For example, where you have: win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../lib/release/ -llib else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../lib/debug/ -llib else:unix: LIBS += -L$$OUT_PWD/../lib/ -llib That might be interpreted by qmake like: win32 { CONFIG(release, debug|release) { LIBS += -L$$OUT_PWD/../lib/release/ -llib } else { win32 { CONFIG(debug, debug|release) { LIBS += -L$$OUT_PWD/../lib/debug/ -llib } else { unix { LIBS += -L$$OUT_PWD/../lib/ -llib } } } } } Which is probably not what you're expecting. You probably mean something more like: win32 { CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../lib/release/ -llib CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../lib/debug/ -llib } unix: LIBS += -L$$OUT_PWD/../lib/ -llib Cheers.
  • Include the command git

    Unsolved
    4
    0 Votes
    4 Posts
    870 Views
    ?
    This has nothing to do with the Qt framework but is only about how to use git. The link I provided above leads to a comprehensive git manual and tutorial.
  • 0 Votes
    8 Posts
    2k Views
    SGaistS
    Some software leave they user preferences intact in case there's a new installation done, e.g. update from a major version which requirers to remove the old one. One thing you could do is remove the documentation stuff anyway and provide an option to the user to remove everything else.
  • CMake produces a mixed debug and release build

    Unsolved cmake
    2
    0 Votes
    2 Posts
    1k Views
    M
    Is '-config Release' a valid command line option? I use -DCMAKE_BUILD_TYPE=Release https://cmake.org/cmake/help/v3.0/variable/CMAKE_BUILD_TYPE.html
  • Qt Creator and Beautifier

    Solved
    2
    0 Votes
    2 Posts
    828 Views
    A
    For someone else with the same question, I have resolved it. Beautifier plugin can use different programs. I was using clangformat which for me it was the fastest. The other two (Artistic Style and Uncrustify) have the option to load the style code file from the own project and it works. I think I am going to finish using uncrustify because there are more examples in the internet than of the other one.
  • 0 Votes
    3 Posts
    822 Views
    S
    @mrjj Thank you.QtCreator was stuck on the welcome screen and didn't open the project files. Now I have unchecked welcome in the plugins and it is ok.Thank you my problem is solved...
  • Error while building/deploying project animatedtiles (kit: Qt4.8.7)

    Unsolved
    10
    0 Votes
    10 Posts
    3k Views
    A
    @jsulm Thanks for the time and useful info...
  • How to use Clang for compiling projects in Qt creator for Windows machine

    Unsolved
    2
    0 Votes
    2 Posts
    3k Views
    kshegunovK
    @desmondcrozby said in How to use Clang for compiling projects in Qt creator for Windows machine: "The ABI of the selected debugger does not match the toolchain ABI" and "The compiler Clang can not produce code for Qt version "<both 5.6.1 and 5.7 occurred here>" Start there. Make sure that Qt's ABI is compatible with the one produced by clang. This basically means that you should make sure that you use matching 32/64bit compiled binary for Qt and that your Qt binary is compiled with clang (the same version). Have you compiled Qt with clang?
  • My Qt4 help file is garbage with Qt 5.6 - how do I get QtWebKit working with Qt 5.6?

    Solved
    11
    0 Votes
    11 Posts
    4k Views
    K
    If you are using VS2015 you can alternatively use binaries from https://github.com/annulen/webkit/releases/tag/qtwebkit-tp3
  • QtCreator + CMake: Several targets from the same code with #ifdef's

    Unsolved
    1
    0 Votes
    1 Posts
    319 Views
    No one has replied
  • QT debugger displaying incorrect value for variable (false instead of true)

    Unsolved
    3
    0 Votes
    3 Posts
    864 Views
    R
    Observed something similar myself once. The reason was that the compiler recognized that the variable (in your case isUdp), was set to true in every case and that it was not used anywhere else. So code was optimized in a way that the initialized value (false) was never overridden and it automatically jumped in the if-branch without checking the variable. If you have something similar and you print the value of isUdp before entering the if-branch to std:out, it should have the correct value (if the compiler doesn't optimize it in a way that it hardcodes the true-value at the output-command).