qscopedpointer

QList of QScopedPointers

老子叫甜甜 提交于 2019-12-20 02:42:12
问题 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

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

QScopedPointer with signals and slots

心不动则不痛 提交于 2019-12-13 07:41:32
问题 as the tittle says, i could not find any relationship or how to pass them to signals and slots. Anyone could give me a quick tutorial? or Introduction? :) 回答1: You have to get an QObject-derived class object from the QScopedPointer by QScopedPointer::data() method and use it: QScopedPointer<QThread> p(new QThread); connect(p.data(), SIGNAL(finished()), SLOT(onThreadFinish())); QScopedPointer class reference 来源: https://stackoverflow.com/questions/31988399/qscopedpointer-with-signals-and-slots

QList of QScopedPointers

我的未来我决定 提交于 2019-12-01 22:44:27
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,QScopedPointerDeleter<T>>::QScopedPointer' : cannot access private member declared in class