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 -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -