Lua: Expose rightSideIconPath property for LineEdit

Change-Id: I668d696d2074f1f4928a461c84f1ecd257a96239
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Lukasz Papierkowski
2025-06-17 13:54:34 +02:00
committed by lie
parent b27ce66d25
commit c028858639
2 changed files with 11 additions and 1 deletions

View File

@@ -739,6 +739,8 @@ void setupGuiModule()
}),
"text",
sol::property(&LineEdit::text, &LineEdit::setText),
"rightSideIconPath",
sol::property(&LineEdit::setRightSideIconPath),
sol::base_classes,
sol::bases<Widget, Object, Thing>());

View File

@@ -152,13 +152,21 @@ function gui.TextEdit(options) end
---A Single line text edit
---@class LineEdit : Widget
---@field rightSideIconPath? FilePath A path to icon
---@field text string Current text
local lineEdit = {}
---@class LineEditOptions : WidgetOptions
---@field rightSideIconPath? FilePath A path to icon
---@field placeHolderText? string A placeholder text for intput
---@field completer? QCompleter A QCompleter object.
---@field onReturnPressed? function The function to be called when Enter is pressed
---@field onRightSideIconClicked? function The function to be called when right side icon is clicked
---@field text string Current text
local lineEditOptions = {}
local lineEdit = {}
---@param options LineEditOptions
---@return LineEdit
function gui.LineEdit(options) end
---@class PushButton : Widget
local pushButton = {}