PDA

View Full Version : problem with char*/QString*



mickey
26th May 2006, 16:34
Hi I wonder what's the problem in that code. Compiler get me this error (on the last code):


error C2664: 'MyPopupmenu::MyPopupmenu(MyWidget *,const char *,const QString *)' : cannot convert parameter 3 from 'const char [6]' to 'const QString *'



MyPopupmenu::MyPopupmenu(MyWidget* parent, const char* name, const QString* title):
QPopupMenu( parent, name) {
.................




MyPopupmenu* myPopupmenu = new MyPopupmenu( this,0, "title" );

jacek
26th May 2006, 17:06
MyPopupmenu::MyPopupmenu(MyWidget* parent, const char* name, const QString* title)
It should be rather:
MyPopupmenu::MyPopupmenu( ..., const QString& title )