代码拉取完成,页面将自动刷新
#ifndef QTMATERIALTEXTFIELD_H
#define QTMATERIALTEXTFIELD_H
#include "qtmaterialwidgets.h"
#include <QLineEdit>
#include <QColor>
class QtMaterialTextFieldPrivate;
class QTMATERIALWIDGETS_EXPORT QtMaterialTextField : public QLineEdit
{
Q_OBJECT
Q_PROPERTY(bool labelVisible READ labelVisible WRITE setLabelVisible)
Q_PROPERTY(qreal labelFontSize READ labelFontSize WRITE setLabelFontSize)
Q_PROPERTY(QString labelText READ labelText WRITE setLabelText)
Q_PROPERTY(bool inputLineVisible READ inputLineVisible WRITE setInputLineVisible)
Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor)
Q_PROPERTY(QColor labelColor READ labelColor WRITE setLabelColor)
Q_PROPERTY(QColor inkColor READ inkColor WRITE setInkColor)
Q_PROPERTY(QColor inputLineColor READ inputLineColor WRITE setInputLineColor)
public:
explicit QtMaterialTextField(QWidget *parent = nullptr);
~QtMaterialTextField() override;
bool labelVisible() const;
void setLabelVisible(bool value);
qreal labelFontSize() const;
void setLabelFontSize(qreal size);
const QString &labelText() const;
void setLabelText(const QString &label);
bool inputLineVisible() const;
void setInputLineVisible(bool value);
bool useThemeColors() const;
void setUseThemeColors(bool value);
QColor textColor() const;
void setTextColor(const QColor &color);
QColor labelColor() const;
void setLabelColor(const QColor &color);
QColor inkColor() const;
void setInkColor(const QColor &color);
QColor inputLineColor() const;
void setInputLineColor(const QColor &color);
protected:
QtMaterialTextField(QtMaterialTextFieldPrivate &d, QWidget *parent = nullptr);
const QScopedPointer<QtMaterialTextFieldPrivate> d_ptr;
private:
Q_DISABLE_COPY(QtMaterialTextField)
Q_DECLARE_PRIVATE(QtMaterialTextField)
// QWidget interface
protected:
bool event(QEvent *event) override;
void paintEvent(QPaintEvent *event) override;
};
#endif // QTMATERIALTEXTFIELD_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。