Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include <QLineEdit>
  4.  
  5. class QCompleter;
  6. class QPushButton;
  7. class SpeedSearch : public QLineEdit
  8. {
  9. Q_OBJECT
  10.  
  11. public:
  12. SpeedSearch(QWidget *parent = 0);
  13. ~SpeedSearch();
  14.  
  15. void initData(const QStringList &strList);
  16. void setCompleter(QCompleter *c);
  17. QCompleter *completer() const;
  18.  
  19. protected:
  20. void showEvent(QShowEvent *event);
  21. void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
  22. void focusInEvent(QFocusEvent *e) Q_DECL_OVERRIDE;
  23.  
  24. private slots:
  25. void insertCompletion(const QString &completion);
  26. void slotPopup();
  27.  
  28. private:
  29. QCompleter *c;
  30. QPushButton *m_button;
  31. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement