qt - send reference qplaintextedit to C++ constructor class -


i need send reference qplaintextedit c++ class analizador add lines qplaintextedit class. add include <qplaintextedit> class, create qplaintextedit graphic interface , call constructor function

analizador *anal=new analizador(ui->textprogres); 

the constructor function is:

analizador(qplaintextedit* text); 

the compiler throw error :

mainwindow.cpp:23: error: undefined reference `analizador::analizador(qplaintextedit*)'

so guess error because i'm not sending pointer constructor function don't know how access pointers of qplaintextedit

ps. i'm new in qt , c++

in case, compiler complains cannot find definition of analizador constructor when tries link application.

make sure have written definition of analizador::analizador(qplaintextedit*) constructor.

if have written constructor still gets issue, cpp file constructor exists may not have got compiled. if using qtcreator, try build -> run qmake , build -> rebuild all


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -