qt-creator

How to customise Qt, so it add certain functions in every new cppf file?

强颜欢笑 提交于 2019-12-12 04:47:45
问题 I am a newbie to Qt, and I was wondering if it was possible to automatically add certain functions declaration in .h file and definition in .cpp file, whenever we add new c++ source file. For ex, if I add new cpp source file(cpp + h file), Qt should add automatically add function initialiseApp(), its declaration in h file and its definition in cpp file. This should also work if I create new project. This makes my work easy as I have to add certain functions in all cpp files. Thanks :) EDIT:

Cross compilation error with QtCreator [Yocto Image]

自古美人都是妖i 提交于 2019-12-12 04:45:10
问题 I've bitbaked a qt5 image for my Beaglebone Black and exported the cross-toolchain sdk. I also tried to setup QtCreator to work with the output toolchain with the steps in this link I put this code at the beginning of the qtcreator.sh file to change the environment variables source /opt/poky/1.6.1/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi and configured the following options qmake : /home/user/cross/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake g++ compiler : /home/user/cross

ROS with QtCreator: autocompletion

感情迁移 提交于 2019-12-12 03:22:28
问题 I'm using and like QtCreator to code and build my ROS projects written in c++ . Unfortunately the auto-completion for my own header files is not working: e.g. #include "LineTracker.hh" Building the project works perfectly. And also the auto-completion for other external packages like ros or opencv is working. Update 2.0: With QtCreator 3.6 the solution is not working Update 1.0: Found a solution, see bottom! Thats how my CMakeLists.txt looks: cmake_minimum_required(VERSION 2.8.3) project(line

Cmake in QtCreator: Source file not displayed in project file tree view

强颜欢笑 提交于 2019-12-12 03:15:34
问题 I'm using CMake och QtCreator to write C code. I open my project by opening the CMakeLists.txt file on the top level. I see all the files in the project file tree view in QtCreator that are used to build executables or libraries like this: add_library( my_lib file1.c ) add_executable( my_executable file2.c ) But I have one file that are used in precompilation for postgres like this: set( MY_CMD "/usr/pgsql-9.3/bin/ecpg" ) set( MY_ARG "file3.pgc" ) add_custom_target( dummy_target ALL COMMAND $

Building Qt Android App fails

余生长醉 提交于 2019-12-12 03:07:57
问题 I'm using Qt5.4.1 on Ubuntu 14.04. I've installed Android SDK Tools 24.1.2, Android SDK Platform-tools 22, Android SDK Build-tools 22.0.1 and API22 in the Android SDK Manager. I have installed java-7-openjdk-amd64 and added the paths to the Android SDK, Android NDK, java-7-openjdk-amd64 and apache-ant-1.9.4 in Qt Creator 3.3.1. If I create a project an build I get this error: 07:40:06: Running steps for project android01... 07:40:06: Configuration unchanged, skipping qmake step. 07:40:06:

Qt multithreaded email : QObject: Cannot create children for a parent that is in a different thread

痞子三分冷 提交于 2019-12-12 02:57:28
问题 I have found an old thread that came close to answering this very question for me, its link can be found here QObject: Cannot create children for a parent that is in a different thread . I know this is an old thread, but I am having a hard time following where to put the signals and slots in my situation. I am writing a program that will send out alerts via email, and I want them to be run in threads so they don't interrupt the main program and each other. I created an EmailThread class that

Error : undefined reference to 'engOpen'

。_饼干妹妹 提交于 2019-12-12 02:49:26
问题 Please, I'm looking for a solution to this problem erreur : undefined reference to 'engOpen' when I try to call mtlb function for c++ I'm working on win64 with QT creator. Here is my .pro file: TEMPLATE = app QT += qml quick CONFIG += c++11 SOURCES += main.cpp RESOURCES += qml.qrc INCLUDEPATH += "C:\Program Files\MATLAB\R2012a\extern\include" LIBS += -L "C:\Program Files\MATLAB\R2012a\bin\win64" # Additional import path used to resolve QML modules in Qt Creator's code model QML_IMPORT_PATH =

Rosbag reader in qtcreator

北慕城南 提交于 2019-12-12 02:13:06
问题 I try to make a rosbag reader in Qtcreator. I create a project and I just want to read informations inside the bag. Here is my pro file: QT += core QT -= gui CONFIG += c++11 TARGET = ROSBag_Reader CONFIG += console CONFIG -= app_bundle TEMPLATE = app LIBS += -lboost_system LIBS+= -lpthread LIBS+= -L/usr/lib/x86_64-linux-gnu LIBS+= -ltf2_ros LIBS+= -lrostime LIBS+= -lrospack LIBS+= -lroslz4 LIBS+= -lroslib LIBS+= -lroscpp_serialization LIBS+= -lroscpp LIBS+= -lrosconsole_print LIBS+=

Starting with KDE Frameworks 5 and Qt Creator

二次信任 提交于 2019-12-12 02:09:27
问题 I've installed fresh QtCreator and Qt 5.8 to my system. As I understand there are 2 Qt toolchains right now on my PC: One in ~/Qt/5.8 (default path) and one is in usr/lib/x86_64-linux-gnu/qt5/bin where KDE stores it for own purposes. The one in /usr/lib/x86_64-linux-gnu/qt5/bin is version 5.7. Ok, If I create a dummy project in Qt Creator then it'll allow me to choose only Qt 5.8 Kit. And if I do so I'll get Project ERROR: Unknown module(s) in QT: KF5DBusAddons on any KDE Frameworks module I

Qimage: out of memory, returning null image

随声附和 提交于 2019-12-12 02:06:54
问题 I am writing a code to show a video in a graphicsView QObject. It goes like this: void MainWindow::UpdateVideo() { cap >> frame; cvtColor(frame, frame,CV_BGR2RGB); QImage Qframe = QImage((uchar*) frame.data, frame.cols, frame.rows, frame.step, QImage::Format_RGB888); QPointer<QGraphicsScene> VideoScene = new QGraphicsScene; VideoScene->addPixmap(QPixmap::fromImage(Qframe)); ui->VideoView->setScene(VideoScene); ui->VideoView->show(); } void MainWindow::on_pushButton_2_clicked() { cap.open(