qt-creator

Can __FILE__ and __LINE__ be made linkable when printed to Qt Creator's debug console?

◇◆丶佛笑我妖孽 提交于 2020-01-12 14:41:00
问题 Header: #define TRACE_ERROR(s) \ { ... char TraceBuffer[512]; sprintf(TraceBuffer, "%s\t(%s:%d)", s, __FILE__, __LINE__); DebugErrTrace(TraceBuffer); ... } Implementation: void DebugErrTrace(char *String, ...) { ... qDebug() << String; } The above spits out a line of debug trace, which might look something like ERROR File Missing! (..\trunk\Common\FileManager.cpp:102) in Qt Creator's debug console. I've noticed that Qt's own error messages e.g. Object::connect: No such slot cClass::Method

Qt Creator “Cannot create file (…) qtcreator.xml” (Mac)

瘦欲@ 提交于 2020-01-12 14:13:31
问题 Qt Creator starts up with several error messages saying that: "Cannot create file /Users/[username]/.config/Nokia/qtcreator.xml: Permission denied" And when I exit: "Cannot create file /Users/[username]/.config/Nokia/toolChains.xml: Permission denied" The program runs fine, but I guess it won't be able to store any config. Anyone know how to fix this? 回答1: As has been mentioned in the comments, it looks like the Qt installer adds the configuration directories with root as the owner. To fix

Qt Creator “Cannot create file (…) qtcreator.xml” (Mac)

房东的猫 提交于 2020-01-12 14:13:29
问题 Qt Creator starts up with several error messages saying that: "Cannot create file /Users/[username]/.config/Nokia/qtcreator.xml: Permission denied" And when I exit: "Cannot create file /Users/[username]/.config/Nokia/toolChains.xml: Permission denied" The program runs fine, but I guess it won't be able to store any config. Anyone know how to fix this? 回答1: As has been mentioned in the comments, it looks like the Qt installer adds the configuration directories with root as the owner. To fix

Add 32-bit versions of Qt 5.7 on a 64-bit machine

末鹿安然 提交于 2020-01-11 01:33:07
问题 Want to manually install 32-bit versions of Qt 5.7 so that I will be able to deploy my app to not only 32-bit but 64-bit machines as well. Initially when I installed it on my 64-bit Windows 7 machine , I only selected the 64-bit components and, hence, I can only select the MSVC2015_64 bit kits in Qt Creator to build my app with. Since I want to deploy my app to a 32-bit Windows 10 machine , I am trying to add the 32-bit Qt versions to my installation; tried through Tools > Options > Build &

Automatically include Qt libraries in the .app bundle deploying on Mac

﹥>﹥吖頭↗ 提交于 2020-01-10 01:59:24
问题 I am using Qt Creator to deploy my Qt application. On Mac, I'd like to include the required Qt libraries in the .app bundle. Is there any way to do it automatically using Qt Creator? Should I do it using the command-line? In that case, how should I do it? 回答1: The macdeployqt command line tool will add all the necessary Qt libraries that your Qt project references. If you require any other, 3rd party libraries, you'll need to copy these manually and set the paths to them using the install

Automatically include Qt libraries in the .app bundle deploying on Mac

南楼画角 提交于 2020-01-10 01:59:22
问题 I am using Qt Creator to deploy my Qt application. On Mac, I'd like to include the required Qt libraries in the .app bundle. Is there any way to do it automatically using Qt Creator? Should I do it using the command-line? In that case, how should I do it? 回答1: The macdeployqt command line tool will add all the necessary Qt libraries that your Qt project references. If you require any other, 3rd party libraries, you'll need to copy these manually and set the paths to them using the install

multiple shared libraries from one project with common source files

人盡茶涼 提交于 2020-01-07 03:09:20
问题 I have a main application wich can be controlled by dynamically loaded plugins (.dll on win - .so on linux). Now i want to create a lot of these plugins where just on function is implemented different. Lets say i have the following files in my Project: plugin.h plugin.cpp i001.cpp i001.cpp contains one implementation of the of the "run" function of my plugin class. Now this Project compiles to "plugin.dll". What i want to achieve is something like this: plugin.h + plugin.cpp + i001.cpp -->

How to find reason for app crash on close?

扶醉桌前 提交于 2020-01-07 02:13:53
问题 My Qt5 app crashes when I hit the close window returning: MyApp(28741,0x7fff7aa73000) malloc: *** error for object 0x7fc40bc8e300: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug The program has unexpectedly finished. Classic approach to recover it, I guess, is to disable application modules (should I say parts of it, when things are not so well organized) systematically until the problem appears. Is there some (more) intelligent way to solve this

Debugging a version of Qt Creator and plugins all built from source

巧了我就是萌 提交于 2020-01-06 19:45:15
问题 My goal is to be working on / debugging qt creator plugins and, maybe, editing / debugging qt creator source code. Towards this end I've tried a couple of things: Downloading source for the qt sdk and qt creator, compiling each, and then making a qt creator plugin project and hooking everything together by hand. This got complicated pretty quickly (I tried to keep my plugin project outside the qt-creator/src/plugin/ folder) and doesn't really get me to a nice spot in terms of debugging. Using

Qt Creator build with the MinGW toolchain is slowish

 ̄綄美尐妖づ 提交于 2020-01-06 04:26:09
问题 When building in Qt Creator using the MinGW toolchain, on Windows, the build is slowish. Takes 21sec for a tiny project. Any fix? 回答1: The fix was to switch to the Microsoft toolchain (including the MSVC compiler and the CDB debugger). Qt Creator supports that toolchain. This brought down build time for me from 21 to 11sec. Also, it brought "build when nothing has changed from the last build" from 4 to 0sec which is a big win as well. Note: The "Compilers" tab in Qt Creator's options listed a