qt-creator

QML scope: property binding in child object failing

落花浮王杯 提交于 2019-12-12 14:41:58
问题 I'm new to QML and ran into a scope problem while going a button tutorial. I solved it but I don't understand why the code didn't work in the first place: Problem The following code gives Runtime reference errors when the button is hovered over: main_broken.qml import QtQuick 2.0 import QtQuick.Controls 1.1 ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Button Tester") Rectangle { id: simpleButton height: 75 width: 150 property color buttonColor: "light blue" property

Using QT Creator 5.8 with MSVC 2015 compiler

北城余情 提交于 2019-12-12 14:28:07
问题 I'm new to C++ and programming, and I'm trying to work on a little project, using Qt and Qt Creator . I was using the MinGW compiler , but for this project I will need to work with the MSVC compiler (since I need to use QtWebEngineWidgets ). I have Qt 5.8 and I'm using Qt Creator . I downloaded Microsoft Visual Studio 2015 (Community). Now, if I go on the kit section of my project, it says that the MSVC kit has no compiler . I went to the compiler section, and I see Microsoft Visual C++

Newbie problem with QT C++ - Qimage dont work?

蹲街弑〆低调 提交于 2019-12-12 11:30:11
问题 I am trying to do console application to read pixels from image: #include <QtCore/QCoreApplication> #include <QtGui/QImage> #include <iostream> int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QImage *img = new QImage("adadad.jpg"); //std::cout << "Type filename:" << std::endl; img->isNull(); return a.exec(); } That doesn't work I got: (IT doesn't compile, but anyway file isn't exist yet...) File not found: tmp/obj/debug_shared/main.o:: In function `main': What is going on?

How to build static Qt libraries for Windows and use them with Qt Creator

痴心易碎 提交于 2019-12-12 10:59:58
问题 I've downloaded the following Qt sources: http://download.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.3.zip and tried to setup a distribution with static libraries using MS VC 2010. Beforehand I did read the following articles: http://www.qtcentre.org/wiki/index.php?title=Building_static_Qt_on_Windows http://www.formortals.com/build-qt-static-small-microsoft-intel-gcc-compiler I modified the mkspecs\win32-msvc2010\qmake.conf - update the QMAKE_CFLAGS_RELEASE key to use the MT

Post-build events in Qt Creator?

一笑奈何 提交于 2019-12-12 10:32:54
问题 Is it possible to have post-build events (as in VC++) in Qt Creator? In particular, I would like to copy the executable to a different folder after it has been built. Can it be done? 回答1: You will find here all the variables you can use in your project file (.pro): http://doc.qt.nokia.com/4.7/qmake-variable-reference.html. The one you are searching for is: DESTDIR Anyway, in QtCreator you can customize all the build and link operation by adding/removing instructions in the Project tab. 回答2:

Qt for android: change the application icon

妖精的绣舞 提交于 2019-12-12 09:34:45
问题 How would I change the icon of Qt project targeted for android so that the launcher of application has this icon? 回答1: You should create an Android manifest file and edit it in Qt Creator. Go to Projects > Build Android APK > Details Now Select Create Templates to create the manifest file and to open it in editor : As shown in the picture, you can set three versions of icons for your application with low, medium, and high DPI values, from left to right. This new way of making an android

How to configure qt creator to show C++ codes rather than disassembler?

扶醉桌前 提交于 2019-12-12 08:04:32
问题 Yesterday I had done a lot of things like updating GCC,Clang and reinstalling Qt Creator.Today when debugging my codes step by step, the debugger was showing the disassembler rather than the C++ codes I wrote. Pressing F10 or F11 , the debugger was moving in disassembler not in .cpp nor .h files I wrote. F11 can only go into the library files but never into the files I wrote. The arrow appeared in disassembler: Rather than in main.cpp: How to configure Qt Creator such that the debugging arrow

qt open a jpg file with warning image format not supported

↘锁芯ラ 提交于 2019-12-12 06:50:39
问题 I open a file of format "jpg" in qt creator ,but qt creator returns a warning with "image format not supported". I also try other format as "png" ,but the waring is same.I hope someone can give me advice on it.I really need help. 回答1: This Warning is about PNG formats and Qt, Irrelevant to @ztono code. Read more about PNG (Portable Network Graphics) https://en.wikipedia.org/wiki/Portable_Network_Graphics PNG has many Formats some old, some not standard for Qt. see more History_and_development

QtCreator 2.3--Lost ability to see QString contents in debugger

我的梦境 提交于 2019-12-12 06:25:03
问题 So I recently upgraded to QtCreator 2.3 (and want to keep it for its QtQuick support) and initially debugger performance slowed to an unusable crawl (though I could still see QString contents). Googling around led me to install gdb 7.3.1, the latest stable release at this time, and that happily brought debugger stepping speed back up to usable levels. But now the debugger won't display the contents of a QString, just the address of the char array, and a lot of private members that don't tell

Qt Creator: unable to switch off disassembly view in debugger

跟風遠走 提交于 2019-12-12 05:48:29
问题 Recently I have installed Ubuntu 16.10. I tried to debug one of my projects in C++/Qt in Qt Creator 4.0.2, that comes in official Ubuntu repository. For some reason, when I set breakpoint in source code and launch debugging, Qt Creator stops at breakpoint, but only in disassembly view. "Operate by Instruction" is disabled. However I have tried both ways. It seems like debugger cannot find sources for this build, but in previous system version (I think Qt Creator 3.6.x was default) I did