Qt Code:
  1. if( QPushButton *button = (QPushButton *)sender())
  2. {// it's a "QPushButton", do something with pb here
  3. QFrame* popup1 = new QFrame(this, Qt::Tool | Qt::Window );
  4. popup1->setWindowTitle("Rename the folder");
  5. QLineEdit *lb=new QLineEdit(popup1);
  6. connect( lb, SIGNAL( returnPressed() ), lb, SLOT( hide() ) );
  7. lb->setFocus();
  8. lb->show();
  9. lb->move(QCursor:os());
  10. qDebug()<<lb->text();
  11. button->setText(lb->text());
  12. button->setObjectName(lb->text());
  13.  
  14. } }
To copy to clipboard, switch view to plain text mode 

u are not setting any text in QLineEdit in ur code .
u shuld use
Qt Code:
  1. lb->setText("Ur Text that u want to display");
To copy to clipboard, switch view to plain text mode 
or else while constructing the lineEdit
QLineEdit::QLineEdit ( const QString & contents, QWidget * parent = 0 )u can set
Qt Code:
  1. QLineEdit *lb=new QLineEdit("Ur Text", popup1);
To copy to clipboard, switch view to plain text mode