qt-creator

How to suppress warnings in Qt Creator

大憨熊 提交于 2020-02-01 03:09:46
问题 I'm wondering if it is possible to suppress compiler specific warnings in Qt-Creator. My g++-4.5 prints: warning: enumeral and non-enumeral type in conditional expression I would like to get rid of it, because it's very annoying. Ubuntu 11.04 x64 g++-4.5 QtCreator 2.01 Qt 4.7 Thank you! 回答1: You need to use this: QMAKE_CXXFLAGS += -Wno-enum-compare if you get a warning that ends in -Wenum-compare , for example. Also, note that some warnings cannot be suppressed as per the GCC documentation

Regex expression in C++ and double backslash

末鹿安然 提交于 2020-01-30 08:35:05
问题 I'm reading a text file in the form of People list [Jane] Female 31 ... and for each line I want to loop through and find the line that contains "[...]" For example, [Jane] I came up with the regex expression "(^[\w+]$)" which I tested that it works using regex101.com. However, when I try to use that in my code, it fails to match with anything. Here's my code: void Jane::JaneProfile() { // read each line, for each [title], add the next lines into its array std::smatch matches; for(int i = 0;

Qt not refreshing Makefiles after changes in the .pro file

纵然是瞬间 提交于 2020-01-30 06:01:52
问题 I'm finding a strange issue with Qt Creator 3.0.1 that is not refreshing the current state of the configuration before compiling and linking. To explain myself better, say my code isn't initially compiling because it's missing a library (e.g. opencv_core248d). If I add it in the .pro file like this: LIBS += -L$$(OPENCV_DIR)/build/x86/vc11/lib -lopencv_core248d the project won't compile and link until I go and manually delete the makefiles generated by qmake (Clean All doesn't work!). After

Set gdb breakpoint when something is printed on std::cerr

半世苍凉 提交于 2020-01-24 15:11:47
问题 I'm using qt-creator as an IDE and frontend for gdb. How can I set a breakpoint when operator<< is called on std::cerr variable? Is it possible from qt-creator or I will have to run gdb standalone? 回答1: How can I set a breakpoint at std::cerr Your question doesn't make sense: std::cerr is a global variable . You can set breakpoints only on functions. You can also set watchpoints on variables, so GDB stops when the variable is modified, but it's likely not what you want either. What you are

Windows 10: The application was unable to start correctly (0xc000a200)

a 夏天 提交于 2020-01-24 14:09:06
问题 I am developing my QT application on windows 10 . The development is complete (as for now). After run the application in debug mode from QT-creator, I am trying to run the executable from the build directory. But it shows me an "Application Error" dialog with the following message: The application was unable to start correctly (0xc000a200). Click OK to close the application. What is the problem and How to fix it ?! 回答1: The error codes are given to you in the error message for a reason. They

QArrayData error, linking Qt libraries with CMake

邮差的信 提交于 2020-01-24 01:19:12
问题 What I've been trying to do is to link Qt libraries to my project with CMake. I would use CMake GUI to generate MakeFile and then run MinGW32-make on it, which would give me '[File Name].exe' as intended. However, whenever I run the executable file, I get a message saying: "The procedure entry point _ZN10QArrayData10deallocateEPS_jj could not be located in the dynamic link library etc." https://i.stack.imgur.com/JpdwK.jpg I initially built this software using Qt Creator and QMake, so I can

Qt 4.7.1, Qt Creator and VS 2010 installation problems

China☆狼群 提交于 2020-01-23 11:10:07
问题 On my computer (Win7 32, VS2010 Ultimate) I would like to use Qt Creator and Qt Visual Studio add in, both LGPL versions. There are minGW and VS2008 versions of Qt frameworks on the Nokia websites, I did not find VS 2010 version. So I have installed Qt 2010.05 SDK and in the VS 2010 Command prompt the following steps have been performed: configure -static nmake sub-src I checked Qt Creator and it successfully runs. After the translation has been finished I installed VS 2010 add I tried to add

signals sent by qtcreator on “stop”

五迷三道 提交于 2020-01-22 21:23:10
问题 I am working on linux and I realized that my application was leaving behind daemon processes when I close it with the "Stop" button on Qt creator IDE. I want to handle these cases so the application close the same way as when I close the main window. To write the handlers, I need to know which signals it corresponds to. 回答1: Digging into QtCreator's code, I can see that QtCreator uses a QProcess internally to launch your app. The red "stop" button is connected to ApplicationLauncher::stop() ,

error: Unknown module(s) in QT: qml quick - Qt Creator

半世苍凉 提交于 2020-01-21 03:56:26
问题 I installed Qt Creator via the Software Manager on Linux Mint 18 (x86_64) . I made a few sample projects, and some dependencies/packages/libraries/whatever were missing, so I installed the via apt. I made a QtQuick application and in Issues there is an error message saying: error: Unknown module(s) in QT: qml quick I read that there is some libraries to build and link, but I don't know where to find them. 回答1: According to Hayt's answer (and the askubuntu post), I had to install the

error: Unknown module(s) in QT: qml quick - Qt Creator

半城伤御伤魂 提交于 2020-01-21 03:56:06
问题 I installed Qt Creator via the Software Manager on Linux Mint 18 (x86_64) . I made a few sample projects, and some dependencies/packages/libraries/whatever were missing, so I installed the via apt. I made a QtQuick application and in Issues there is an error message saying: error: Unknown module(s) in QT: qml quick I read that there is some libraries to build and link, but I don't know where to find them. 回答1: According to Hayt's answer (and the askubuntu post), I had to install the