forked from qt-creator/qt-creator
Lua: Add text setter to LineEdit
Change-Id: I62a75f861ae632ca60e58ebed8bc75ff3d03b04c Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -1149,6 +1149,11 @@ QString LineEdit::text() const
|
||||
return access(this)->text();
|
||||
}
|
||||
|
||||
void LineEdit::setText(const QString &text)
|
||||
{
|
||||
access(this)->setText(text);
|
||||
}
|
||||
|
||||
void LineEdit::setRightSideIconPath(const Utils::FilePath &path)
|
||||
{
|
||||
if (!path.isEmpty()) {
|
||||
|
@@ -340,6 +340,7 @@ public:
|
||||
LineEdit(std::initializer_list<I> ps);
|
||||
|
||||
QString text() const;
|
||||
void setText(const QString &);
|
||||
void setRightSideIconPath(const Utils::FilePath &path);
|
||||
void setPlaceHolderText(const QString &text);
|
||||
void setCompleter(QCompleter *completer);
|
||||
|
@@ -556,7 +556,7 @@ void setupGuiModule()
|
||||
return constructWidgetType<LineEdit>(children, guard);
|
||||
}),
|
||||
"text",
|
||||
sol::property(&LineEdit::text),
|
||||
sol::property(&LineEdit::text, &LineEdit::setText),
|
||||
sol::base_classes,
|
||||
sol::bases<Widget, Object, Thing>());
|
||||
|
||||
|
Reference in New Issue
Block a user