Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对 Qt 很陌生,并试图做这个简单的事情,但我不能:(这是我想在图片上做的事情:http: //pokazywarka.pl/r2dwtb-2/
非常感谢您的帮助。
看起来它是一个直截了当的 setText;
ui->lineEdit2->setText( ui->lineEdit1->text() );
您还可以通过将信号 textChanged 连接到插槽 setText 来使其“自动”
connect(ui.lineEdit1, SIGNAL(textChanged(const QString &)), ui2.lineEdit2, SLOT(setText(const QString &)));