kemp
24th August 2006, 10:50
Hi!
I am porting custom widget plugins for Qt Designer from Qt3 to Qt4.
I managed to solve all errors except one.
I have a PURE VIRTUAL function which is not implemented:
virtual void paintRow( Q3Painter *p, const QColorGroup &cg, int row, CRow *pRow ) = 0;
In my plugin class:
QWidget *CLargeListPlugin::createWidget(QWidget *parent)
{
return new CLargeList(parent);
}
It says:
>.\largelistplugin.cpp(61) : error C2259: 'CLargeList' : cannot instantiate abstract class
> due to following members:
> 'void CLargeList:: paintRow(Q3Painter *,const QColorGroup &,int,CRow *)' : is abstract
>d:\projcomp\qt\largelist\largelist.h(122) : see declaration of 'CLargeList:: paintRow'
I have tried this and it works:
virtual void paintRow( Q3Painter * /*p*/, const QColorGroup & /*cg*/, int /*row*/, CRow * /*pRow*/ ) { ; }
but when i want to use my plugin in a test application i get an unresolved external simbol error.
How can i create a working plugin?
I am looking forward for your help.
Thank you.
I am porting custom widget plugins for Qt Designer from Qt3 to Qt4.
I managed to solve all errors except one.
I have a PURE VIRTUAL function which is not implemented:
virtual void paintRow( Q3Painter *p, const QColorGroup &cg, int row, CRow *pRow ) = 0;
In my plugin class:
QWidget *CLargeListPlugin::createWidget(QWidget *parent)
{
return new CLargeList(parent);
}
It says:
>.\largelistplugin.cpp(61) : error C2259: 'CLargeList' : cannot instantiate abstract class
> due to following members:
> 'void CLargeList:: paintRow(Q3Painter *,const QColorGroup &,int,CRow *)' : is abstract
>d:\projcomp\qt\largelist\largelist.h(122) : see declaration of 'CLargeList:: paintRow'
I have tried this and it works:
virtual void paintRow( Q3Painter * /*p*/, const QColorGroup & /*cg*/, int /*row*/, CRow * /*pRow*/ ) { ; }
but when i want to use my plugin in a test application i get an unresolved external simbol error.
How can i create a working plugin?
I am looking forward for your help.
Thank you.