qt-creator

Use C++11 in Qt Creator [duplicate]

本秂侑毒 提交于 2019-12-30 08:58:19
问题 This question already has answers here : How to enable C++11 in Qt Creator? (6 answers) Closed 4 years ago . I'm using Qt Creator on Ubuntu, and I'd like to use the new C++11 features, however they are not enabled by default. How can I configure Qt Creator to support the new C++11 features? 回答1: You can achieve this by adding: QMAKE_CXXFLAGS += -std=c++11 to your .pro file. 来源: https://stackoverflow.com/questions/17510897/use-c11-in-qt-creator

How to uninstall Qt Creator on Mac Yosemite

爷,独闯天下 提交于 2019-12-30 08:32:33
问题 I have tried this but when I do, the terminal ask me for password. I don't know what this password is? I don't have any password on my mac, i don't enter any password when I login and I can't get passed the first step below. sudo QtSDK/SDKMaintenanceTool.app/Contents/MacOS/SDKMaintenanceTool I am uninstalling Qt Creator 2.8.1 on Mac OS Yosemite 10.10 I just want to install the latest 5.3.2 version and get rid of the old one. I could probably choose a new folder but I don't want to do that and

View Array contents in Qt Creator debugger

亡梦爱人 提交于 2019-12-30 07:59:46
问题 I am using Qt on Ubuntu. When I debug I only see the very first value of the array in Locals and Watchers. How can I view all the array contents? struct node { int *keys; void **pointers; int num_keys; struct node *parent; int is_leaf; struct node *nextLevelNode; }; It shows only the first key value in the debugging window. 回答1: In Expression evaluator, Try (int[10])(*myArray) instead of (int[10])myArray Or, *myArray@10 instead of myArray@10 回答2: It shows only the first key value,in the

How to compile on multiple cores using mingw inside QTCreator

天大地大妈咪最大 提交于 2019-12-30 02:48:09
问题 I have a quad-core i7 CPU on my windows desktop. I am trying to get mingw32-make to compile using as many core as possible. I have added -j8 into the "Make Arguments" fields under Build Settings->Build Steps. mingw32-make seems to completely ignore the option since I don't get any speed improvement out of that. When I view the CPU usage in task manager, it stays at 13% and I only see one instance of g++ running. Right now, rebuilding the whole project using mingw takes 3 full minutes.

INCLUDEPATH in qmake project file doesn't work

南笙酒味 提交于 2019-12-28 16:33:31
问题 I've got a problem with include in a qmake project. In my .pro file I've got: INCLUDEPATH += "C:\OpenCV\build\include" and in my cpp : #include <opencv\cv.h> The compiler indicates an error: Cannot open include file: 'opencv\cv.h': No such file or directory but if I write this in my cpp: #include "C:\OpenCV\build\include\opencv\cv.h" it works! I build the project from within Qt Creator. What am I doing wrong? 回答1: You have to run qmake(build->run qmake) to validate changes in the pro file. Qt

How does Qt5 redirect qDebug() statements to the Qt Creator 2.6 console

拟墨画扇 提交于 2019-12-28 12:29:47
问题 After searching around for a reason that qDebug() statements work fine with Qt's standard message handler but fail when I switch to my own, I'm appealing here to see if anyone else has any experience with the problem. Things I know about / have tried, that do nothing... 1) CONFIG += console 2) DEFINES -= QT_NO_WARNING_OUTPUT QT_NO_DEBUG_OUTPUT 3) ::fprintf(stderr, "ERROR\n"); ::fflush(stderr); 4) ::fprintf(stdout, "OUTPUT\n"); ::fflush(stdout); 5) std::cerr << "CERROR" << std::endl; std::cerr

VC++ compiler for Qt Creator

两盒软妹~` 提交于 2019-12-28 07:07:11
问题 I want to use the VC++ toolset to build programs for XP and Vista, but I do not want to buy the IDE, because I want to use Qt Creator. I would download the Windows SDK and the Windows Debugging Tools, but I'm not sure if this includes everything that I need (i.e: compiler, linker, nmake, debuggers). Has anyone used this approach? How did it go? Note: I know about VC++ Express, but that version of the compiler has certain features disabled AFAIK. Later edit: I want to know if I can use the SDK

Where in Qt Creator do I pass arguments to a compiler?

梦想的初衷 提交于 2019-12-28 04:00:32
问题 Where in Qt Creator do I pass arguments to a compiler? It isn't really that obvious. 回答1: Depending on your build system it's either in your qmake project file(.pro, standard for new projects) or in one of the CMake files (CMakeLists.txt, used by KDE and several other projects). Using .pro: QMAKE_CXXFLAGS += -O2 Using CMake: set( CMAKE_CXX_FLAGS "-g -Wall") 回答2: To add compiler flags, open your .pro file and add a line like this: QMAKE_CXXFLAGS += -std=c++0x For standard flags like debug vs.

Why does my Qt 4.5 app open a console window under Windows?

試著忘記壹切 提交于 2019-12-28 04:00:28
问题 I've been playing around with Qt Creator 4.5 under Linux. My application builds just fine under Linux, but if I build in Windows, the app always opens a console window at startup. Can I stop it doing that? I'm building using the default MinGW setup, perhaps that is related. If need be I can build with Visual Studio, but I'd like to understand what is happening first... Edit : I just created a simple test GUI app with Qt Creator under Windows and it didn't exhibit this behaviour. Either this

Qt5 - Windows :Windows cannot find executable

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-25 18:28:36
问题 I am trying to build a project using Windows 10 and Qt5.12 . The small program is using the smtp protocol available here. I can confirm that on my Windows I have the OpenSSL 1.1.1c 28 May 2019. On my Ubuntu 19.04 the same exact program compiles and run as usual but not on Windows. I git clone my repository into Windows , followed successfully this post and the program builds correctly. The problem is that when I run it, it cannot find the executable and is asking for it as it is possible to