DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
dpasswordedit.h
浏览该文件的文档.
1// SPDX-FileCopyrightText: 2015 - 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DPASSWORDEDIT_H
6#define DPASSWORDEDIT_H
7
8#include <DLineEdit>
9
10DWIDGET_BEGIN_NAMESPACE
11
12class DPasswordEditPrivate;
13class LIBDTKWIDGETSHARED_EXPORT DPasswordEdit : public DLineEdit
14{
15 Q_OBJECT
16 Q_PROPERTY(bool isEchoMode READ isEchoMode NOTIFY echoModeChanged)
17
18public:
19 DPasswordEdit(QWidget *parent = nullptr);
20
21 bool isEchoMode() const;
22 void setEchoMode(QLineEdit::EchoMode mode);
23
24 void setEchoButtonIsVisible(bool visible);
25 bool echoButtonIsVisible () const;
26
27Q_SIGNALS:
28 void echoModeChanged(bool echoOn);
29
30protected:
31 Q_DISABLE_COPY(DPasswordEdit)
32 D_DECLARE_PRIVATE(DPasswordEdit)
33 Q_PRIVATE_SLOT(d_func(), void _q_toggleEchoMode())
34
35 void changeEvent(QEvent *event) override;
36};
37
38DWIDGET_END_NAMESPACE
39
40#endif // DPASSWORDEDIT_H
DLineEdit一个聚合 QLineEdit 的输入框.
Definition dlineedit.h:20
void setEchoMode(QLineEdit::EchoMode mode)
设置回显的模式
Definition dlineedit.cpp:340
DPasswordEdit提供了一个让用户输入的密码框.
Definition dpasswordedit.h:14