diff options
| author | Brian Munro <brian.alexander.munro@gmail.com> | 2018-05-08 12:47:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-08 12:47:54 +0200 |
| commit | 0da6af17b2d6a6965849aa0effd5a1a876f447c4 (patch) | |
| tree | 306056296c7a35504e85825ec6965b5193c74b24 /src/modidlineedit.cpp | |
| parent | bc75009169ecbf378fa90891dc8183a8cb3ef499 (diff) | |
| parent | 44111d12c181ff062d7936480fdc380e33232e0e (diff) | |
Merge pull request #336 from Modorganizer2/Develop
Release 2.1.3
Diffstat (limited to 'src/modidlineedit.cpp')
| -rw-r--r-- | src/modidlineedit.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/modidlineedit.cpp b/src/modidlineedit.cpp new file mode 100644 index 00000000..7d1f0c38 --- /dev/null +++ b/src/modidlineedit.cpp @@ -0,0 +1,19 @@ +#include "modidlineedit.h" +#include <QWhatsThis> + +#include <QEvent> +#include <QWhatsThisClickedEvent> + +ModIDLineEdit::ModIDLineEdit(QWidget *parent) : QLineEdit(parent) {} +ModIDLineEdit::ModIDLineEdit(const QString &text, QWidget *parent) : QLineEdit(text, parent) {} + +bool ModIDLineEdit::event(QEvent *event) +{ + if (event->type() == QEvent::WhatsThisClicked) + { + QWhatsThisClickedEvent *wtcEvent = static_cast<QWhatsThisClickedEvent*>(event); + emit linkClicked(wtcEvent->href().trimmed()); + } + + return QLineEdit::event(event); +}
\ No newline at end of file |
