qt-material-widgets/components/autocomplete.h

39 lines
635 B
C
Raw Normal View History

2022-02-17 15:17:19 +00:00
#ifndef AUTOCOMPLETE_H
#define AUTOCOMPLETE_H
2022-02-17 15:17:19 +00:00
#include "textfield.h"
namespace md
{
class AutoCompletePrivate;
class AutoComplete : public TextField
{
Q_OBJECT
public:
explicit AutoComplete(QWidget *parent = 0);
~AutoComplete();
2017-10-13 03:51:39 +00:00
void setDataSource(const QStringList &data);
signals:
void itemSelected(QString);
protected slots:
void updateResults(QString text);
protected:
bool event(QEvent *event) Q_DECL_OVERRIDE;
2017-10-13 19:37:05 +00:00
bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE;
private:
Q_DISABLE_COPY(AutoComplete)
Q_DECLARE_PRIVATE(AutoComplete)
};
}
2022-02-17 15:17:19 +00:00
#endif // AUTOCOMPLETE_H