qt-creator

Configure Qt Creator for Android development

早过忘川 提交于 2020-07-22 21:19:20
问题 I have installed: Qt 5.14.1 for msvc 2017 & Android installed to c:\Qt\Qt5.14.1\ : Compilers available in Qt Creator: Kits available: JDK-13.0.2 installed to c:\Program Files\Java\jdk-13.0.2 Android Studio 3.6.1 g:\Android\Android Studio\ with SDKs installed to g:\Android\SDK as shown below: SDK tools: Now what I see in Qt Creator: How can I fix these errors? Why did they arise? Edit: I've installed JDK 8 instead of 13. But still have the same red crosses. Also in the topic 'Platform SDK

How to use mpfr/gmp in Qt-Creator properly?

╄→гoц情女王★ 提交于 2020-07-22 07:49:23
问题 Hello I want to create a Qt5 project using Qt-creator and want to use mpfr/gmp so I need how to configure the project. because if i compile I get these errors: #include "mainwindow.h" #include <QApplication> #include <stdio.h> #include <gmp.h> #include <mpfr.h> int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); mpfr_t x, y, z, t; mpfr_inits2 (256, x, y, z, t, (mpfr_ptr) 0); return a.exec(); } The output: error: undefined reference to `mpfr_inits2' But on

qDebug not displaying anything

我的未来我决定 提交于 2020-05-28 13:44:26
问题 Often when I need to debug something it's easier to print something using qDebug() instead of debugging step-by-step using a debugger. The problem is that from time to time the output of qDebug() isn't displayed at all! The same with qWarning and qCritical . What's strange, it only occurs when running the project normally (Ctrl+R), while when debugging (F5) the output shows up. 回答1: The solution is simple: add CONFIG += console to your .pro file and rebuild the whole project. 回答2: Solution

qDebug not displaying anything

孤街醉人 提交于 2020-05-28 13:44:12
问题 Often when I need to debug something it's easier to print something using qDebug() instead of debugging step-by-step using a debugger. The problem is that from time to time the output of qDebug() isn't displayed at all! The same with qWarning and qCritical . What's strange, it only occurs when running the project normally (Ctrl+R), while when debugging (F5) the output shows up. 回答1: The solution is simple: add CONFIG += console to your .pro file and rebuild the whole project. 回答2: Solution

QtCreator Build doesn't update UI changes in design form

微笑、不失礼 提交于 2020-05-13 04:16:09
问题 My Qt project uses shadow build. When I change in MainWindow form ( .ui file), I build the project but my program doesn't update GUI. If I rebuild all, GUI will be updated. But rebuild is very very slow. I try creating a new project (an empty QMainWindow with some labels), I modify some texts. I build and GUI is updated. How can I use shadow build correctly, without a rebuild of all my project? 回答1: The same issue occurs if the *.ui file name is changed. For example, Changing yourUi.ui to

QtCreator Build doesn't update UI changes in design form

感情迁移 提交于 2020-05-13 04:13:12
问题 My Qt project uses shadow build. When I change in MainWindow form ( .ui file), I build the project but my program doesn't update GUI. If I rebuild all, GUI will be updated. But rebuild is very very slow. I try creating a new project (an empty QMainWindow with some labels), I modify some texts. I build and GUI is updated. How can I use shadow build correctly, without a rebuild of all my project? 回答1: The same issue occurs if the *.ui file name is changed. For example, Changing yourUi.ui to

Qt Creator color scheme

我的未来我决定 提交于 2020-05-09 17:41:59
问题 I like the dark "FakeVim" color scheme in Qt Creator. However it only makes the editor part dark while everything else stays normal, which is a bit disturbing. Is there any way to make such dark scheme global for Qt Creator? Vim (dark) Color Scheme Color scheme is applied solely to text editor (as this is the only option), and not the environment. 回答1: I found some trick for your problem! Here you can see it: Habrahabr -- Redesigning Qt Creator by your hands (russian lang.) According to that

Create video file using sequence of QPixmap in QT Creator- C++

折月煮酒 提交于 2020-04-30 04:44:45
问题 I have QWidget (named as screenshotLabel) and continuously it's content is changing.I can get that lable content to qpixmap (named as originalPixmap) as bellow. originalPixmap = QPixmap(); QPixmap pixmap(screenshotLabel->size()); this->render(&pixmap); originalPixmap = pixmap; Now I want to save it as a video file.But I could not able to do it.How can I save QWidget content as a video file? 回答1: I found a way to generate video using OpenCV VideoWriter.I leave comments in the code that

Unable to run qt-creator executable outside ide compiled in release mode

旧街凉风 提交于 2020-04-18 05:42:38
问题 After switch to release mode to build a small project I have, when I try run it from inside the qt-creator ide, all goes fine. But when I go to the folder build-<project_name>-Desktop_Qt_5_14_1_MinGW_64_bit- Release and try run the executable generated in this directory, I got this error: Anyone knows what the problem here? If it was some missing dll, I supose it will specify what dll was missing, right? Or I am mistaken? update After run windeployqt , this command found dependencies for my

Opening Qt Project After Relocating It

故事扮演 提交于 2020-04-16 02:32:50
问题 I created a C++ Qt Creator CMake project. It worked perfectly when I loaded in to the program. However, when I copy pasted the project into another folder, it doesn't open in the Qt creator application anymore. Instead of a Qt project, it just opens as a normal folder with CMakeLists.txt only while all other files are added separately. Is there no way I can copy the program as it is? 回答1: Remove CMakeLists.txt.user when copying it to another folder. Then QtCreator will not open the old