qt-creator

Using Library In QTCreator Undefined Reference

混江龙づ霸主 提交于 2019-12-11 07:24:13
问题 I am building my own library of functions I use to help me learn C++. I am attempting a simple QT application and when I run the app I get an undefined error. Not sure what I am doing wrong, and its probably a noob thing. Library Files CC_Number.h #ifndef CC_NUMBER_H #define CC_NUMBER_H #include <string> using namespace std; class CC_Number { public: CC_Number(); virtual ~CC_Number(); int randCC(int imin=0, int imax=1); int arraySize(int x[]); int arraySize(double x[]); int arraySize(float x[

Qt Creator: When I have a file in a subdir of the project, it's not included in project-wide search

时光毁灭记忆、已成空白 提交于 2019-12-11 07:03:57
问题 Let's say my project is called foo . I created a subdir called subdir in the foo root, using Windows Explorer. I put my main.qml file in subdir . Then I tried to do a project-wide search for "text" in my project. To do this, I pressed Ctrl+Shift+F , selected Project "foo" in Scope , wrote "text" in Search for . No matches were found, though main.qml does contain the string "text". When main.qml is in the project root, the string is found just fine. Is this a bug in Qt Creator and is it

exploiting poppler in Qt creator - help

删除回忆录丶 提交于 2019-12-11 06:59:39
问题 I am trying to compile a Qt project that uses poppler library for pdf (linux). I put #include in the mainwindow.cpp I put poppler folder in my project folder besides mainwindow.cpp poppler-qt4.h is in poppler-0.16.7/qt4/src I do not need to recompile poppler, I just need to link the library through its headers but I do not know how to do. If compilation is necessary I can do it, but I tried ./configure and it said "./configure not found". I searched for other similar threads but they were not

Add icon from array to QListWidget item

这一生的挚爱 提交于 2019-12-11 06:56:39
问题 I've written a loop which adds some items to my QListWidget . Now I want them to have an icon from my qrc file. For this I would use a loop in which I add a unique icon to each item. void Test::Query() { ui->listWidget_Available->clear(); QString CmdList[4] = {"kcmshell4 --list|grep -q kcm_grub2", "kcmshell4 --list|grep -q kcm_networkmanagement", "which pastebunz", "[ -z $ink3_ver ]"}; QString NameList[4] = {"kcm_grub2", "kcm_networkmanagement", "pastebunz", "Shellmenu"}; QString IconList[4]

Qt with Lua | Where to place lua file(s)

独自空忆成欢 提交于 2019-12-11 06:48:47
问题 I've created a cpp file with the main method implementing calls to lua. When compiling + executing the qt project I receive the following error: PANIC: unprotected error in call to Lua API (attempt to call a string value) The problem is that lua cannot find the lua file to be executed (at least I think it is). So I copied the file to all the debug dirs and the main dir but it still didn't work. Thanks for helping me! main.cpp #include <stdio.h> extern "C" { #include "lua.h" #include "lualib.h

Qt - Unexpected GDB Exit

断了今生、忘了曾经 提交于 2019-12-11 05:52:55
问题 I am trying to develop an application that creates an image and fills it with color pixels using bilinear interpolation and then displays it. My code so far is the following: #include <QtCore/QCoreApplication> #include <opencv/cv.h> #include <opencv/highgui.h> #include <iostream> #include <string> #include <sys/stat.h> using namespace cv; int main() { Mat image; image.create( 500, 500, CV_8UC3); //upper left corner Vec3b ul( 255, 0, 0 ); //upper right corner Vec3b ur( 0, 255, 0 ); //bottom

View Array contents in QtCreator

梦想的初衷 提交于 2019-12-11 05:28:51
问题 Is it possible to view the contents of an array in Qt Creator when debugging? It seems to detect that my array is an array and not a pointer. Additionally, an arrow becomes available for me to click on as if to expand - but nothing shows after that. When I tried it on std::vector , Qt Creator managed to display the contents as expected. PS: I found this old post about viewing array contents, but its over 2 years old and does not seem relevant anymore. 回答1: If you mean a regular array like int

CMake in QtCreator 4.3 shows many automatic targets, how to remove/hide them?

╄→гoц情女王★ 提交于 2019-12-11 05:27:11
问题 I just switched to the last version of QtCreator (4.3.1) and the project explorer now shows many targets like ContinuousBuild, ContinuousConfigure, NightlyBuild, ExperimentalCoverage etc. How can I remove all of these (or at least hide them) ? I don't even know where this is generated in CMake. Seems to be related to this question Hide automatically generated CTest targets except that I am not using CLion. 回答1: You are probably using somewhere: include(CTest) According to the documentation:

Qt 5 and LibVLC

人盡茶涼 提交于 2019-12-11 05:04:25
问题 I'm working on a project which involves receive, display and rebroadcast several local network video streams. LibVLC seems to be the way to go, I'd like to use it within Qt Creator/C++/OSX 10.12.1 and I also need the project to be compilable on some Windows 10 machines where I have Qt installed. I successfully tested some functionalities by installing the offical QT-LibVLC wrapper from projects.tano.si/vlc-qt. Unfortunately the wrapper lacks many LibVLC methods which are essential to my

R with C++ (QtCreator, Windows, Rcpp, RInside)

狂风中的少年 提交于 2019-12-11 04:54:50
问题 I have a problem when it comes to using R within the C++ code. I'd like to create UI in c++ and do all needed calculations in R. So i've found stuff like Rcpp and RInside and even though i've read a lot from Dirk Eddelbuettel's site, i'm not able to compile even the easiest program from examples attached to RInside. Obviously there is a problem with QtCreator config, I've been trying to make it right, but with no success. What i'm asking for would be step-by-step explanation of QT adjustment