qt-creator

Valgrind in Qt Creator

南楼画角 提交于 2019-12-10 18:24:19
问题 Using the Memcheck function of Qt Creator returns the following: valgrind: Bad option: --xml=yes, but no XML destination specified valgrind: --xml=yes has been specified, but there is no XML output valgrind: destination. You must specify an XML output destination valgrind: using --xml-fd, --xml-file or --xml-socket. valgrind: Use --help for more information or consult the user manual. Analyzing finished. ** Unknown error ** Is there something in the configuration that hasn't been set properly

How to use Octave libraries with C++

邮差的信 提交于 2019-12-10 18:05:38
问题 This is my first question here, so sorry in forward if it is not well formulated or stupid. I am trying to use the octave libraries with C++ I am using Qt creator on Ubuntu (linux noob) #include "octave/oct.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); Matrix matrix(3,4); return a.exec(); } At first I got some undefined references errors. I figured out the program is missing libraries, so I looked for the library "liboctave.so". I found it in usr/lib/octave-3.2.4. To be

How to “set a breakpoint in malloc_error_break to debug” in Qt Creator?

别说谁变了你拦得住时间么 提交于 2019-12-10 17:53:59
问题 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. How to “set a breakpoint in malloc_error_break to debug” in Qt Creator 4 (Mac OS)? Should be better to do it via terminal in lldb/gdb, how? Reference: How to find reason for app crash on close? 回答1: In Breakpoints window, right click->

How to change/configure desired compiler in Qt creator? i.e. switch between MSVC/Mingw or g++/clang++

你。 提交于 2019-12-10 16:53:39
问题 I am aware about how to add compiler in Qt Creator. However my Qt always chooses MSVC compiler. How to set MinGW (built-in or external) instead of MSVC? Couldn't find any post which can help a newbie to know how to change the compiler of desired preference. My current system is Windows, however information on Linux (g++ <--> clang++) is also welcome. 回答1: Following is the way with Qt 5.9: While configuring a new project, select only those compilers/kits which are required; For 64-bit system,

How to add a widget (QPushButton for example) dynamically to a layout built in designer

拈花ヽ惹草 提交于 2019-12-10 16:12:42
问题 I'm having a play around with Qt mainly looking to rewrite an old java app for symbian and I have got my self a bit confused. I should first of all explain that C++ is not my kung-fu, and that may be the cause of the problem. What I am trying to do is add a simple QPushButton to a Vertical Layout in a main window which has been built in qt designer at run time. My example code is something like this... QPushButton button = new QPushButton(); QString text("Testing Buttons"); button.setText

Qt Creator `.pro.shared` files don't seem to have any effect

自闭症网瘾萝莉.ら 提交于 2019-12-10 15:53:36
问题 I'm using Qt Creator 2.6.0 on Mac OS 10.8.2, and I've created a myproject.pro.shared file in the same folder as myproject.pro . I copied the example XML from https://qt-project.org/doc/qtcreator-2.6/creator-sharing-project-settings.html to the myproject.pro.shared file. I deleted my ~/.config/QtProject/ folder and I do not have a myproject.pro.user file. When I launch Qt Creator and open the project file, the settings specified in myproject.pro.shared are not used. For example, myproject.pro

Undefined symbols for architecture x86_64 in QT-creator

浪子不回头ぞ 提交于 2019-12-10 15:38:33
问题 I'm just starting out with C++ and am learning how to use QT creator as the IDE so I suspect this might be really easy but I might be missing something. I installed apollo MQ and installed the apache CMS(C++ messaging service) so I can interact with the server in C++. The problem is, I have no clue what I'm doing :-) (yet), and am not sure why I'm getting the above error when using the examples. I am pretty sure the examples are good because they are included in the source's example folder so

How to access the complete value of string variables when debugging in qt creator?

ⅰ亾dé卋堺 提交于 2019-12-10 15:27:31
问题 I'm debugging my c++ application and I have some string variables which can have 2000 characters or more. When debugging, the variable's value is shown incomplete (ending with "...") instead of showing the correct value. Also when I right click the variable and select "Copy current VALUE to clipboard" it is also copied incomplete. I think this must be a very basic thing but I didn't found in qt creator how to show the actual complete content of the variable? Thanks in advance. In Tools ->

How to link Intel MKL library, just cblas_dgemm function is used

随声附和 提交于 2019-12-10 15:14:57
问题 I want to test Intel MKL matrix multiplication, So I include and I just use the cblas_dgemm function, but it always says undefined reference to `cblas_dgemm' I also link the -lmkl_core -lmkl_blas95_lp64 -lmkl_lapack95_lp64 , But I have testes many combinations among the libraries in the $MKLROOT/lib/intel64/ directory, the error still exists. Could someone give me some advice, please? Thanks. 回答1: Maybe this is a right answer, we can use cblas_ : In the project file of a QT Creator: unix {

How to get Qt-Creator to build using cygwin make?

眉间皱痕 提交于 2019-12-10 14:51:18
问题 Does anyone know how to configure Qt-Creator to use cygwin's make to build a project? Maybe this is a simple cygwin-mangled Windows path problem, but I can't get Qt-Creator to find/run cygwin's make . My make lives in /usr/bin , which is actually c:\cygwin\c\usr\bin on my system. Either way, Qt can't seem to find it using all the obvious build settings I can think of. Thanks--- 回答1: [This answer works for me using Qt Creator 2.0.93 (beta 2.1), YMMV] I spent some time tracking down a similar