qt5

QList of QScopedPointers

▼魔方 西西 提交于 2019-12-20 02:42:06
问题 I'm trying to store QScopedPointers in a QList. I found this comment One can also use QList >. – Kuba Ober Jan 14 '14 at 18:17 (first comment on this answer: https://stackoverflow.com/a/21120575/3095014) and this post https://forum.qt.io/topic/59338/solved-qlist-of-qscopedpointers which implies that this should work. But if I try to compile the code of the second link, I'm getting this errors: E:\Qt\Qt5Enterprise\5.5\msvc2013\include\QtCore/qlist.h(404) : error C2248: 'QScopedPointer<Label

Qt 5.0 and c++11 with OSX Mountain Lion

早过忘川 提交于 2019-12-20 02:00:57
问题 I'm giving c++ a try again after being away for 7 years. I've downloaded the newly released Qt 5.0 sdk for osx, but I can't get a basic c++11 feature compiled using Qt Creator. The following statement: auto i = 3; results in a compilation error: mainwindow.cpp:19: error: ISO C++ forbids declaration of 'i' with no type I've google around for similar problems and found suggestions to put QMAKE_CXXFLAGS += -std=c++11 or CONFIG += c++11 in the .pro file. Unfortunately without success .The build

(三)Qt5.9.1下载和安装(在Windows系统下)

不问归期 提交于 2019-12-20 00:11:17
一、下载地址   https://download.qt.io/official_releases/qt/5.9/5.9.1/ 二、安装教程:   https://blog.csdn.net/u010308862/article/details/80835254 一、Qt5.9.0下载 首先从官网上下载Qt5.9.0版本,https://download.qt.io/official_releases/qt/5.9/,下载qt-opensource-windows-x86-5.9.0.exe 等待下载完就开始安装啦! 二、安装步骤 安装的步骤也是很简单,选中qt-opensource-windows-x86-5.9.0.exe右键以管理员身份运行软件 点击Skip,当然如果你想填也可以,接下来下一步 设置安装路径,安装路径最好全英文,否则容易出问题。【更多精彩教程,视频教学,源码分享请加入QQ群:569268376】 选择你要安装的组件,接下来下一步,不知道如何选择去看书《Qt5.9开发指南》 选择接受 接下来就是一个漫长的等待… 好啦,终于完成了,打开Qt看到欢迎界面 更多精彩教程,源码分享请加入QQ群:569268376 。 来源: CSDN 作者: 博雅勇士 链接: https://blog.csdn.net/boyaaboy/article/details

How to detect Qt Creator's target (debug/release) (Visual Studio)

[亡魂溺海] 提交于 2019-12-19 18:23:21
问题 So I use qmake to create my program, but I'm always having a conflict between my debug and release boost libraries with the message: libboost_system-vc120-mt-s-1_58.lib(error_code.obj):-1: error: LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj I would like to make this automated, in such a way where choosing debug or release from Qt Creator suffices to create the correct version. I saw other solutions like the one here, but that doesn't

How to detect Qt Creator's target (debug/release) (Visual Studio)

£可爱£侵袭症+ 提交于 2019-12-19 18:22:03
问题 So I use qmake to create my program, but I'm always having a conflict between my debug and release boost libraries with the message: libboost_system-vc120-mt-s-1_58.lib(error_code.obj):-1: error: LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj I would like to make this automated, in such a way where choosing debug or release from Qt Creator suffices to create the correct version. I saw other solutions like the one here, but that doesn't

Icon is not showing up in Qt Main Window

萝らか妹 提交于 2019-12-19 11:16:37
问题 My Qt application contains a Main Window. I added resource into project and added an icon to the resource. From the main window source file I used the following line to load the icon to the main window. this->setWindowIcon(QIcon("://img/Icon.ico")); When I run the application from Qt creator, it shows the icon in the mainwindow BUT when I run the exe from the executable path directly(copied all Qt dependency dlls into that folder) it is not showing the icon in the main window. Not sure what I

Qt - How to run a C++ function when QML button is clicked? Using QQmlApplicationEngine

寵の児 提交于 2019-12-19 10:33:26
问题 myclass.h #ifndef MYCLASS_H #define MYCLASS_H #include <QDebug> #include <QObject> class MyClass : public QObject { public: MyClass(); public slots: void buttonClicked(); void buttonClicked(QString &in); }; #endif // MYCLASS_H myclass.cpp #include "myclass.h" MyClass::MyClass() { } void MyClass::buttonClicked() { // Do Something } void MyClass::buttonClicked(QString &in) { qDebug() << in; } main.cpp #include <QApplication> #include <QQmlApplicationEngine> #include <myclass.h> #include

QMediaplayer streaming from a custom QIODevice with encryption on Mac OS (10.9)

爷,独闯天下 提交于 2019-12-19 10:32:26
问题 i'm currently porting an application from Qt4(.8.4) to Qt5(.2.0). I'm nearly done with all the known changes like deprecated toAscii()-function, missing QtGui and so on. Now we had a music player using the phonon framework which is not supported any more and got replaced by the QtMultimedia module including the QMediaPlayer and a bunch of Audio-Handling classes. Our implementation of the player takes a custom QIODevice. This device provides an interface to encrypted audiofiles on the disk.

QMake CONFIG() function and 'active configuration'

半腔热情 提交于 2019-12-19 08:17:26
问题 While reading through the documentation for Qt 5.1, and specifically qmake, I was stumped by the explanation given in the documentation for the qmake CONFIG() function. I completely understood the one-argument version of the function, but the two-argument version makes absolutely no sense to me. I think my confusion is coming from the lack of a definition for 'active config' since the Qt 5.1 documentation says the following: This function can be used to test for variables placed into the

QMake CONFIG() function and 'active configuration'

醉酒当歌 提交于 2019-12-19 08:17:06
问题 While reading through the documentation for Qt 5.1, and specifically qmake, I was stumped by the explanation given in the documentation for the qmake CONFIG() function. I completely understood the one-argument version of the function, but the two-argument version makes absolutely no sense to me. I think my confusion is coming from the lack of a definition for 'active config' since the Qt 5.1 documentation says the following: This function can be used to test for variables placed into the