Skip to content

Commit

Permalink
feat: add hideAlertMessage to dlineedit
Browse files Browse the repository at this point in the history
Change-Id: Ib404cc9f96e74beee5b62c22f00219434cfa5d7a
  • Loading branch information
Iceyer committed Dec 22, 2017
1 parent 770c8a8 commit 87aff6e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/widgets/dlineedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@ void DLineEdit::showAlertMessage(const QString &text, int duration)
d->tooltip->show(pos.x(), pos.y());
}

void DLineEdit:: hideAlertMessage()
{
Q_D(DLineEdit);

if (d->tooltip) {
d->tooltip->hide();
}
}

void DLineEdit::setIconVisible(bool visible)
{
Q_D(DLineEdit);
Expand Down
1 change: 1 addition & 0 deletions src/widgets/dlineedit.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class LIBDTKWIDGETSHARED_EXPORT DLineEdit : public QLineEdit, public DTK_CORE_NA
void setAlert(bool isAlert);
bool isAlert() const;
void showAlertMessage(const QString &text, int duration = 3000);
void hideAlertMessage();

void setIconVisible(bool visible);
bool iconVisible() const;
Expand Down

0 comments on commit 87aff6e

Please sign in to comment.