qt-creator

Build errors C++ with Poco and Qt Creator

一曲冷凌霜 提交于 2019-12-10 10:39:35
问题 I am getting build errors in Qt Creator when trying to build a sample in the Poco library. I used these instructions to build poco with MinGW. This is the sample I am trying to use: // httpget.cpp // // $Id: //poco/1.4/Net/samples/httpget/src/httpget.cpp#3 $ // // This sample demonstrates the HTTPClientSession and the HTTPCredentials classes. // // Copyright (c) 2005-2012, Applied Informatics Software Engineering GmbH. // and Contributors. // // Permission is hereby granted, free of charge,

/usr/include/c++/7/cstdlib:75:15: fatal error: stdlib.h: No such file or directory #include_next <stdlib.h>

房东的猫 提交于 2019-12-10 10:28:16
问题 I've c++ qt project using opengl and CGAL but I've the following error : /usr/include/c++/7/cstdlib:75:15: fatal error: stdlib.h: No such file or directory #include_next <stdlib.h> I searched about the problem and most of solutions about -DENABLE_PRECOMPILED_HEADERS=OFF I use it at .pro file and it doesn't solve the problem . .pro file : QT += core gui opengl QT += xml greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = try_gui TEMPLATE = app DEFINES += QT_DEPRECATED_WARNINGS #DEFINES +=

Qt: passing variables to subprojects

两盒软妹~` 提交于 2019-12-10 03:52:25
问题 The structure of my project is as follow: Proj Proj.pro --subProj --subProj.pro ----subsubProj ----subsubProj.pro Is there a way i can instance a global variable in subProj.pro and call it en e.g. subsubProj.pro like: Proj.pro: GLOBAL_VAR = true subsubProj.pro: message($$GLOBAL_VAR) Update Maybe I should more precise with my problem. The usual behavior in Qt Creator when you right-click on Proj and choose "Build project"Proj"" is that qmake Proj.pro gets invoked then qmake subProj.pro and

QtCreator build returns collect2: ld returned exit status 1

帅比萌擦擦* 提交于 2019-12-10 03:14:43
问题 While building several different projects in QtCreator, I have run across the following build error: collect2: ld returned 1 exit status After only changing a few things (that should not change anything significant in the build), it will go away if it has already appeared, or it will appear if it's not there. In my current program for a school project, I am trying to compile rock03.cpp. It's the only file in the build, and has the main() method. I had just run it successfully, and went back

How to make QtLinguist shipped with Qt 5.9.1 work?

白昼怎懂夜的黑 提交于 2019-12-10 02:02:08
问题 Goal: Generate/update the *.ts files of a Qt widgets app using lupdate . Setup: Windows 7 Pro 64 (tried on Windows 10 Home as well) Qt 5.9.1 Prebult Components for msvc2017 64-bit, Visual Studio Community 2017. The problem: I have run lupdate from the QtCreator , as well as manually from the console, but in neither case it is working. The message is: Starting external tool "C:\Qt\Qt5.9.1\5.9.1\msvc2017_64\bin\lupdate.exe" C:/Documents/Projects/untitled1/untitled1.pro WARNING: Project ERROR:

No syntax highlight for *.qss file in Qt Creator?

我怕爱的太早我们不能终老 提交于 2019-12-10 01:27:10
问题 It's wired that Qt Creator didn't have a syntax highlight for its own style file format , or did i missed some packages ? VER: Qt Creator 2.1.0 回答1: I could not find any evidence in Qt's documentation that .qss is an officially designated file extension. I'd say just change it to .css . 回答2: Go to Tools > Options > Environment > Mime types Find text/css and add *.qss to patterns. 来源: https://stackoverflow.com/questions/7624656/no-syntax-highlight-for-qss-file-in-qt-creator

Variables in Locals and Expressions not accessible in QT Creator

 ̄綄美尐妖づ 提交于 2019-12-09 17:53:36
问题 If I try to debug my C++ program in QT Creator the Locals and Expressions window shows me the variables in the program. However all the values show "< not accessible >". Screenshot: How do I get the values to show? I can print the values out with cout so I know they are initialized. Edit: It seems like it only applies to strings Specs/other: Windows 8, 64bit QT 5.2.0 MinGW 32bit, I think 4.8 QT Creator 3.0.0 回答1: Try to remove the checkmark at Tools/Options/Debugger/GDB/Load system GDB pretty

QtCreator: kit-specific precompiler macro definitions

痴心易碎 提交于 2019-12-09 17:50:11
问题 I am using QtCreator 3.1.1 to build a cross-platform project, and so I arranged to have different compilation kits for targeting my desktop PC and my BeagleBoneBlack (BBB). Now I would like to define some macro in qmake project file ( .pro ) which are specific only for a given kit. In other words I would like do in my .pro file something like: if(kit == BBB) DEFINES += MY_BBB_MACRO elseif(kit == Desktop) DEFINES += MY_DESKTOP_MACRO else DEFINES += OTHER_MACRO Is is possible? How can I do that

Qt moc error 1 - what does it mean?

怎甘沉沦 提交于 2019-12-09 15:47:08
问题 I'm trying to build a project on Mac OSX, and it's giving me a cryptic error: [moc_droparea.cpp] Error 1 droparea.cpp is (obviously) a file in the project. I checked that it exists in the project directory and is not corrupted. The file moc_droparea.cpp doesn't show up in the build folder after this error, so I'm assuming it's failing to build for whatever reason, but the error is too vague to help me figure out what's going on. Could anyone help me figure out what this means please? 回答1:

Qt Program deploy to multi platform, how?

时光毁灭记忆、已成空白 提交于 2019-12-09 12:28:25
问题 Am new in Qt Programming and i would like to develop a program which i want to run in Windows, Linux(ubuntu), and Mac. I heard that Qt support mutli-platform application development, but my Question is that, would any Qt library need to run these appilication in Ubuntu after i deployed or compiled? 回答1: If you deploy on Ubuntu, and therefore use a .deb package, then your job is easy since you just have to require qt as a dependency and apt will automatically install it as needed. Windows and