Hi!
Having a problem to connect a qlabel and qpushbutton.
Here`s some code:
Qt Code:
  1. QLineEdit *lineEdit = new QLineEdit;
  2. QLabel *copied = new QLabel;
  3. QPushButton *copy = new QPushButton("&Copy");
  4.  
  5. QDialog::connect(copy, SIGNAL(clicked()), copied, SLOT(setText(lineEdit->text())));
  6. 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