c++ - Working with two user interfaces - Qt 5.5 -


i have simple mainwindow has button , lineedit. when type , click button, new dialog appears label supposed display string typed. basically, have trouble sending information ui. tried working new class string variable, didn't work.

i try give example of want do.

//ui2 dialog     ui2->label->settext(ui->lineedit->text()); 

ui private variable, it's not accessible class.

//mainwindow.cpp mainwindow::mainwindow(qwidget*){    this->_dialog = new dialog(this);    //... } mainwindow::on_pushbutton_clicked(){    _dialog->_labe->settext(ui->lineedit->text()); }  //dialog.h class dialog{ public:   qlabel* _label;   dialog(qwidget* ){     _label = ui->label;   } } 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -