Guest User

Untitled

a guest
Jul 17th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. connect(ui->passwordSetLineEdit,SIGNAL(textEdited(QString)),this,SLOT(onTextEdit(QString)));
  2.  
  3. MyClass::MyClass() :
  4. edit(new QLineEdit(this))
  5. {
  6. edit->installEventFilter(this);
  7. }
  8.  
  9. bool MyClass::eventFilter(QObject* object, QEvent* event)
  10. {
  11. if(object == edit && event->type() == QEvent::MouseClick) {
  12. // bring up your custom edit
  13. return false; // lets the event continue to the edit
  14. }
  15. return false;
  16. }
Add Comment
Please, Sign In to add comment