qt-creator

How do I stop Qt Creator placing my executable in a “debug” subdirectory?

孤人 提交于 2020-01-03 17:34:06
问题 I'm building a project in Qt Creator, and while I don't care where the intermediate .obj files go it's important that the final executable be put in (and run from) a particular directory where the many dependency DLLs etc. are to be found. So, in Qt Creator, I select the 'Shadow Build' option and specify the path to this directory. What I always find, however, is that instead of being put into this directory, the final executable is always placed into the_Directory_I_Actually_Want/debug ...

How do I stop Qt Creator placing my executable in a “debug” subdirectory?

孤者浪人 提交于 2020-01-03 17:34:05
问题 I'm building a project in Qt Creator, and while I don't care where the intermediate .obj files go it's important that the final executable be put in (and run from) a particular directory where the many dependency DLLs etc. are to be found. So, in Qt Creator, I select the 'Shadow Build' option and specify the path to this directory. What I always find, however, is that instead of being put into this directory, the final executable is always placed into the_Directory_I_Actually_Want/debug ...

How to use version control with Qt Creator's project settings with many users?

早过忘川 提交于 2020-01-03 17:17:12
问题 When using Qt Creator with qmake projects, let's say example.pro , then Qt Creator's own configuration is normally stored in example.pro.user file. But this file contains user-specific settings, so if many people are working on the project, it is not a good idea to commit it to shared version control repository. Still, this file often contains complex settings for deployment and environment variables, and it would be very good to store these to version control. Is there a way to store

Link tesseract libs with QtCreator

给你一囗甜甜゛ 提交于 2020-01-03 17:08:20
问题 I'm trying to run a C++ program which is based on tesseract API and I'm using QtCreator as IDE on Ubuntu, in order to perfom page layout analysis : int main(void) { int left, top, right, bottom; tesseract::TessBaseAPI tessApi; tessApi.InitForAnalysePage(); cv::Mat img = cv::imread("document.png"); tessApi.SetImage(reinterpret_cast<const uchar*>(img.data), img.size().width, img.size().height, img.channels(), img.step1()); tesseract::PageIterator *iter = tessApi.AnalyseLayout(); while (iter-

How to set language standard (-std) for Clang static analyzer in Qt Creator

萝らか妹 提交于 2020-01-03 16:47:14
问题 I write my project in C using QtCreator as IDE and CMake for build. QtCreator ver. >= 4.0.0 include Clang static analyzer, that I try to use. In my CMakeLists.txt set: set(CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}") When I launch analysis in console get errors: error: invalid argument '-std=gnu++11' not allowed with 'C/ObjC' How to pass '-std=gnu99' to clang analyzer? Maybe it's hardcoded in QtCreator plugin sources? UDP1 : Seems like it's the QtCreator bug: https://bugreports.qt.io/browse

QML doesn't show svg images

半世苍凉 提交于 2020-01-03 15:35:01
问题 I wrote a simple QML ui that is using some svg images. When I execute the app on my desktop everything is fine, the UI is shown and also the svg images on it. The problem happens when I try to execute the app on an embedded device (running windows embedded). In this case the UI is displayed but the svg images are not shown and on the console I'm getting the following message: QML BorderImage: Invalid image data: my_image.svg The png images are shown correctly instead. I research the problem

Is it possible to use Qt Style Sheets with promoted widgets in Qt Creator?

穿精又带淫゛_ 提交于 2020-01-03 11:48:14
问题 I'm trying to do some heavy redeisgning of standard widgets using Qt Style Sheets. So after doing most of it manually for different widgets by #objectName selectors I've decided to group similar widgets in some way. For example, I have multiple QFrames which act like headers in inner forms. And I want all of them to have the same stylesheet. One way of doing that is using naming convention (this is my fallback variant), i.e. QFrame[objectName|="prefix_"] . But I wanted to group my widgets by

How do I define a variable when I call CMake, so that qtcreator knows it is defined?

强颜欢笑 提交于 2020-01-03 09:39:19
问题 I have a section of code that is conditionally activated depending on a #define, like this: #ifdef VARIABLE code.function(); #endif The cmake script has an 'options' command that sets the VARIABLE like this: option(VARIABLE "Want to use VARIABLE?" ON) if(VARIABLE) message(STATUS "VARIABLE") set(VARIABLE_FLAG "-DVARIABLE") endif() set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VARIABLE_FLAG} -Wall") I'm using cmake to build the project and qtcreator as IDE. My problem is that qtcreator thinks that

Why doesn't Qt Creator find included headers in included paths - even though qmake is able to find them

对着背影说爱祢 提交于 2020-01-03 06:57:32
问题 I joined an already existing (opensource-) Qt 4 project to add some functionality. The project compiles and runs perfectly on Linux Slackware with Qt 4.8.5. As IDE I first used KDevelop (comes with Slackware), but Qt project files aren't supported in KDevelop (since it primarily uses cmake, I had to use the makefile to import the project). Now I want to switch to Qt Creator, but header files in included (relative-) paths aren't recognized. For example the project file is in "dir0/programs

QT: No Such Slot

家住魔仙堡 提交于 2020-01-02 06:31:07
问题 Problem is that I keep getting the 'No Such Slot' runtime error in Qt Creator every time I launch a 'settings' window from my main window. I've found Qt to be quite counter-intuitive so far and this slots 'n signals concept seems a bit of a stretch from simply passing vars or function calls. Basically, I have menu with a settings option, that when clicked, opens a settings window which needs to grab a double from the user and update a var in the main window. SettingsWindow.h class