qt-creator

How to get started with IDEs, Especially Qt Creator?

佐手、 提交于 2019-12-11 04:25:06
问题 I'm a highschool student, who have only ever coded in Turbo C++. I have no idea how IDEs work, I installed Qt Creator to start learning GUI programming but I can't even get it to run a simple C++ code. I doesn't know what files to include. NOTE: I'm a total newbie . The tutorials I found on YT are confusing and not clear. I have no idea why this is happening. This is my code: #include<IOSTREAM.H> #include<CONIO.H> void main() { clrscr(); cout << "Hello World!"; getch(); } I did build all,

How to remotely debug graphic application with QtCreator?

可紊 提交于 2019-12-11 04:19:41
问题 I develop a cross-platform Qt application. And now I need/want to run it on a remote host with GUI form loading. I know 2 ways to do that: open application on a remote display (may be virtual) with console attached to QtCreator via ssh run with remote X session, like it done with ssh -X or -Y . When I run an application through QtCreator on the remote device it says QXcbConnection: Could not connect to display When I connect to remote host with ssh -Y and run my app, it says QXcbConnection:

QGraphicsScene subclass is ignoring mouse press events

Deadly 提交于 2019-12-11 04:06:15
问题 I have a UI and a QGraphicsScene subclass GraphicsScene that implements mousePressEvent(), however mouse clicks are being ignored. ui->setupUi(this); scene = new GraphicsScene(this); scene->addPixmap(QPixmap::fromImage(someImage)); ui->graphicsView->setScene(scene); connect(scene, SIGNAL(clicked(QPoint)), this, SLOT(someSlot(QPoint))); GraphicsScene::mousePressEvent() is not called, and so does not emit signal clicked(). Is there something else I need to set to enable this? UPDATE: void

How to use debugger in Qt Creator

浪子不回头ぞ 提交于 2019-12-11 03:53:47
问题 I use Qt Creator for C++ projects (non-Qt actually). This might be a dumb question, but how do you manage to use the debugger in Qt Creator ? I have been using CDB along with VisualStudio or gdb along with IDEs like Code::Blocks and they are all intuitive to use. When it comes to Qt Creator though, I'm hopeless! For instance, I've tried putting breakpoints, but when I run the code, it just skips the breakpoints without doing anything! What am I doing wrong? 回答1: You should make "Debug" target

runtime error when linking ffmpeg libraries in qt creator

北城余情 提交于 2019-12-11 03:22:54
问题 I'm quite new around here but i hear that if you want a question answered, stackoverflow is the place to ask it >.<. So i hope that my question isn't too trivial that everyone will get annoyed at my lack of research (I've tried googling for two days already D= no progress!) I've also asked this question in the Qt forums, but i figured i'd ask here too. so... For the last few days I’ve been fiddling around with opengl and the like, trying to write a video player. However, when i try to import

RUN button no enable in QtCreator for QML project

≡放荡痞女 提交于 2019-12-11 02:12:13
问题 I am using QTCreator 2.2.1, based on QT 4.7.4(32 bit) on Windows XP. I made a QML project from new -> QML project menu but the RUN button is not enable. How do I run QML project. 回答1: Have you created a new QML file instead of a Qt Quick Project? If you have created just a plain QML file it cannot be built and ran by itself. If you are trying to create a new project from scratch, you can try selecting: File -> New -> "Qt Quick Project" from the top of the left panel and select either "Qt

How can I get trigger signal for disabled QAction element?

孤人 提交于 2019-12-11 02:08:58
问题 I have disabled QAction menu element: QAction *item = new QAction(itemTitle); item->setEnabled(false); I use SLOT connection to call function after element was pressed, but it's works only for enabled elements: QObject::connect(item, SIGNAL(triggered()), this, SLOT(func())); My question is how can I trigger some function for disabled QAction element ? Qt 5.9.2, MSVC2017 64bit compiler 回答1: setEnabled() property holds whether the widget is enabled. In general an enabled widget handles keyboard

Qt Creator doesn't load settings from externally generated .creator.user file

落爺英雄遲暮 提交于 2019-12-11 02:08:26
问题 I am trying to generate .creator.user files for many generic Qt Creator projects. I am using a custom build tool and would like to have each Qt Creator project use custom build commands to call this tool, which is why I'm messing with .creator.user files. Unfortunately, the .creator.user files I'm generated are being renamed .creator.user.1.3 and ignored by Qt Creator, which then generates default .creator.user files that don't use my settings. Any suggestions for how to make Qt Creator

Qt iOS running fails

不羁岁月 提交于 2019-12-11 01:53:54
问题 When I try to run my app on iOS simulator, in Application Output I see Starting remote process. Run ended. When I try to run it on my iPhone, in Issues I see xcodebuild failed . However, in both ways I have correct XCode projects and can run them myself. It's not so bad, but how can I repair the process? I also had some problems with Qt and iOS before, solved it by this and this answers. My software: Qt - 5.6.0 Qt Creator - 3.6.1 XCode - 8.0 MacOS - 10.12 来源: https://stackoverflow.com

Using OpenCV 2.3 with Qt in QtCreator

折月煮酒 提交于 2019-12-11 01:33:15
问题 as the release of OpenCV 2.3 is finally out, I wanted to compile and install this latest release on my system. As I often work with Qt and the QtCreator I of course wanted to be able to use it in my Qt projects. I've tried several methods now for some hours but always get errors: First try: Compiling OpenCV 2.3 with WITH_QT First I wanted to do it just like I did with the 2.2 release which worked fine for me. For this I followed this guide: http://knowtheabc.wordpress.com/2011/02/25/windows