Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <QtWidgets>
  2. #include <iostream>
  3.  
  4. int main(int argc, char** argv)
  5. {
  6.     QApplication a{argc, argv};
  7.    
  8.     QLineEdit lineEdit;
  9.     lineEdit.setText("Test");
  10.    
  11.     QObject::connect(&lineEdit, &QLineEdit::textChanged, [&](){
  12.         std::cout << lineEdit.text().toStdString() << std::endl;
  13.     });
  14.    
  15.     lineEdit.show();
  16.    
  17.    
  18.     return a.exec();
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement