Hi!
Having a problem to connect a qlabel and qpushbutton.
Here`s some code:
QDialog::connect(copy,
SIGNAL(clicked
()), copied,
SLOT(setText
(lineEdit
->text
())));
QDialog::connect(copy,
SIGNAL(clicked
()), lineEdit,
SLOT(clear
()));
QLineEdit *lineEdit = new QLineEdit;
QLabel *copied = new QLabel;
QPushButton *copy = new QPushButton("&Copy");
QDialog::connect(copy, SIGNAL(clicked()), copied, SLOT(setText(lineEdit->text())));
QDialog::connect(copy, SIGNAL(clicked()), lineEdit, SLOT(clear()));
To copy to clipboard, switch view to plain text mode
The first connect sentence isnt working. I`ve tried with setText("foobar"), but even then nothing happens with the label
Bookmarks