// Получаешь текст
QString szLineEdit = linedit.text();
// Вставляешь текст
textedit.setText( szLineEdit);
$make
Цитата
Qt_prog.cpp: In member function ‘void prog::connect_()’:
Qt_prog.cpp:58: error: request for member ‘text’ in ‘((prog*)this)->prog::lineEdit’, which is of non-class type ‘QLineEdit*’
Qt_prog.cpp:59: error: request for member ‘setText’ in ‘((prog*)this)->prog::text’, which is of non-class type ‘QTextEdit*’
make: *** [Qt_prog.o] Ошибка 1
prog :: prog (QWidget *parent, const char *name)
: QDialog(parent, name)
{
lineEdit = new QLineEdit(this);
text = new QTextEdit(this);
buttonConnect = new QPushButton(tr("&Connect"), this);
QObject::connect(buttonConnect, SIGNAL(clicked()), this , SLOT(connect_()));
}
void prog::connect_()
{
QString szLineEdit = lineEdit.text();
text.setText( szLineEdit);
}