Under gcc:
#include <QtGui>
#include <QtCore>
class test
{
public:
test()
: list( QList<QGraphicsLineItem>() )
{ }
private:
QList<QGraphicsLineItem> list;
};
int main(int argc, char *argv[])
{
test t;
return app.exec();
}
#include <QtGui>
#include <QtCore>
class test
{
public:
test()
: list( QList<QGraphicsLineItem>() )
{ }
private:
QList<QGraphicsLineItem> list;
};
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
test t;
return app.exec();
}
To copy to clipboard, switch view to plain text mode
returns:
In file included from ..\Qt\include/QtCore/qlist.h:1,
from ..\Qt\include/QtCore/../../src/corelib/kernel/qobject.h:50,
from ..\Qt\include/QtCore/qobject.h:1,
from ..\Qt\include/QtCore/../../src/corelib/io/qiodevice.h:46,
from ..\Qt\include/QtCore/qiodevice.h:1,
from ..\Qt\include/QtCore/../../src/corelib/xml/qxmlstream.h:45,
from ..\Qt\include/QtCore/qxmlstream.h:1,
from ..\Qt\include/QtCore/QtCore:3,
from ..\Qt\include\QtGui/QtGui:3,
from main.cpp:1:
..\Qt\include/QtGui/../../src/gui/graphicsview/qgraphicsitem.h: In member function 'void QList<T>::node_copy(QList<T>::Node*, QList<T>::Node*, QList<T>::Node*) [with T = QGraphicsLineItem]':
..\Qt\include/QtCore/../../src/corelib/tools/qlist.h:606: instantiated from 'void QList<T>::detach_helper() [with T = QGraphicsLineItem]'
..\Qt\include/QtCore/../../src/corelib/tools/qlist.h:114: instantiated from 'QList<T>::QList(const QList<T>&) [with T = QGraphicsLineItem]'
main.cpp:8: instantiated from here
..\Qt\include/QtGui/../../src/gui/graphicsview/qgraphicsitem.h:865: error: 'QGraphicsLineItem::QGraphicsLineItem(const QGraphicsLineItem&)' is private
..\Qt\include/QtCore/../../src/corelib/tools/qlist.h:370: error: within this context
..\Qt\include/QtGui/../../src/gui/graphicsview/qgraphicsitem.h:865: error: 'QGraphicsLineItem::QGraphicsLineItem(const QGraphicsLineItem&)' is private
..\Qt\include/QtCore/../../src/corelib/tools/qlist.h:383: error: within this context
In file included from ..\Qt\include/QtCore/qlist.h:1,
from ..\Qt\include/QtCore/../../src/corelib/kernel/qobject.h:50,
from ..\Qt\include/QtCore/qobject.h:1,
from ..\Qt\include/QtCore/../../src/corelib/io/qiodevice.h:46,
from ..\Qt\include/QtCore/qiodevice.h:1,
from ..\Qt\include/QtCore/../../src/corelib/xml/qxmlstream.h:45,
from ..\Qt\include/QtCore/qxmlstream.h:1,
from ..\Qt\include/QtCore/QtCore:3,
from ..\Qt\include\QtGui/QtGui:3,
from main.cpp:1:
..\Qt\include/QtGui/../../src/gui/graphicsview/qgraphicsitem.h: In member function 'void QList<T>::node_copy(QList<T>::Node*, QList<T>::Node*, QList<T>::Node*) [with T = QGraphicsLineItem]':
..\Qt\include/QtCore/../../src/corelib/tools/qlist.h:606: instantiated from 'void QList<T>::detach_helper() [with T = QGraphicsLineItem]'
..\Qt\include/QtCore/../../src/corelib/tools/qlist.h:114: instantiated from 'QList<T>::QList(const QList<T>&) [with T = QGraphicsLineItem]'
main.cpp:8: instantiated from here
..\Qt\include/QtGui/../../src/gui/graphicsview/qgraphicsitem.h:865: error: 'QGraphicsLineItem::QGraphicsLineItem(const QGraphicsLineItem&)' is private
..\Qt\include/QtCore/../../src/corelib/tools/qlist.h:370: error: within this context
..\Qt\include/QtGui/../../src/gui/graphicsview/qgraphicsitem.h:865: error: 'QGraphicsLineItem::QGraphicsLineItem(const QGraphicsLineItem&)' is private
..\Qt\include/QtCore/../../src/corelib/tools/qlist.h:383: error: within this context
To copy to clipboard, switch view to plain text mode
Doing the same thing, but replacing QGraphicsLineItem with int or anything else works... I'm at a loss
Bookmarks