# include "ui_counter. H"
# include "model. H"
Counter: : counter (QWidget * parent) :
QDialog (parent),
UI (new UI: : counter)
{
The UI - & gt; SetupUi (this);
//this - & gt; Mode=new model; After added the phrase error cannot link counter. The obj: 1: error: LNK2019: cannot resolve the external symbol of "public: __cdecl model: : model (void)" (?????? 0 model @ @ QEAA @ XZ), the symbol in the function ": public: __cdecl counter: counter (class QWidget *)" (?????? 0 counter @ @ QEAA @ PEAVQWidget @ @ @ Z) referenced
This - & gt; Tem="";
}
Counter: : ~ counter ()
{
Delete the UI;
}
Void counter: : on_btn_0_clicked ()
{
If (tem!="")
{
This - & gt; Tem +=this - & gt; The UI - & gt; Btn_0 - & gt; The text ();
This - & gt; The UI - & gt; Label_result - & gt; SetText (this - & gt; Tem);
}
}
Void counter: : on_btn_1_clicked ()
{
This - & gt; Tem +=this - & gt; The UI - & gt; Btn_1 - & gt; The text ();
This - & gt; The UI - & gt; Label_result - & gt; SetText (this - & gt; Tem);
}
Void counter: : on_btn_2_clicked ()
{
This - & gt; Tem +=this - & gt; The UI - & gt; Btn_2 - & gt; The text ();
This - & gt; The UI - & gt; Label_result - & gt; SetText (this - & gt; Tem);
}
Void counter: : on_btn_3_clicked ()
{
This - & gt; Tem +=this - & gt; The UI - & gt; Btn_3 - & gt; The text ();
This - & gt; The UI - & gt; Label_result - & gt; SetText (this - & gt; Tem);
}
Void counter: : on_btn_4_clicked ()
{
This - & gt; Tem +=this - & gt; The UI - & gt; Btn_4 - & gt; The text ();
This - & gt; The UI - & gt; Label_result - & gt; SetText (this - & gt; Tem);
}
Void counter: : on_btn_5_clicked ()
{
This - & gt; Tem +=this - & gt; The UI - & gt; Btn_5 - & gt; The text ();
This - & gt; The UI - & gt; Label_result - & gt; SetText (this - & gt; Tem);
}
Void counter: : on_btn_6_clicked ()
{
This - & gt; Tem +=this - & gt; The UI - & gt; Btn_6 - & gt; The text ();
This - & gt; The UI - & gt; Label_result - & gt; SetText (this - & gt; Tem);
}
Void counter: : on_btn_7_clicked ()
{
This - & gt; Tem +=this - & gt; The UI - & gt; Btn_7 - & gt; The text ();
This - & gt; The UI - & gt; Label_result - & gt; SetText (this - & gt; Tem);
}
Void counter: : on_btn_8_clicked ()
{
This - & gt; Tem +=this - & gt; The UI - & gt; Btn_8 - & gt; The text ();
This - & gt; The UI - & gt; Label_result - & gt; SetText (this - & gt; Tem);
}
Void counter: : on_btn_9_clicked ()
{
This - & gt; Tem +=this - & gt; The UI - & gt; Btn_9 - & gt; The text ();
This - & gt; The UI - & gt; Label_result - & gt; SetText (this - & gt; Tem);
}
Void counter: : on_btn_clear_clicked ()
{
This - & gt; Tem="";
This - & gt; The UI - & gt; Label_result - & gt; SetText (this - & gt; Tem);
}
Void counter: : on_btn_add_clicked ()
{
//int number=this - & gt; Tem, toInt ();
//this - & gt; Mode - & gt; SetNum1 (number);
}
Void counter: : on_btn_sub_clicked ()
{
//int number=this - & gt; Tem, toInt ();
//this - & gt; Mode - & gt; SetNum1 (number);
}
Void counter: : on_btn_mul_clicked ()
{
//int number=this - & gt; Tem, toInt ();
//this - & gt; Mode - & gt; SetNum1 (number);
}
Void counter: : on_btn_div_clicked ()
{
//int number=this - & gt; Tem, toInt ();
//this - & gt; Mode - & gt; SetNum1 (number);
}
Void counter: : on_btn_equal_clicked ()
{
}
CodePudding user response:
Code is not full, how to answer you? Your model?