我自己实现一个类,基于QWideget,我想把它的对象放入链表,做法如下:
class Myview :public QWidget
{
   public:
   view(QWidget parent,const char* name);
   ..........................
}
void main()
{
   list <Myview> mylist;
   Myview view(this);
   mylist.push_back(view);    
}
我觉得是真确的,可是编译时出现错误提示如下:
/usr/include/g++-3/stl_construct.h: In method `Myview::Myview 
(const Myview &)':
/usr/include/g++-3/stl_construct.h:48:   instantiated from `construct (_T1 *, const _T2 &) [with _T1 = Myview, _T2 = 
Myview]'
PLC_LAD_IL.cpp:293:   instantiated from here
/usr/local/qt/include/qwidget.h:685: `QWidget::QWidget (const QWidget 
&)' is private
/usr/include/g++-3/stl_construct.h:48: within this context
 请高手指点。
[ 此贴被XChinux在2005-11-23 16:20重新编辑 ]