forked from qt-creator/qt-creator
Lua: Add support for Layouting::Label
Change-Id: Id06f082262af1aed4e22d40790ad3ed6ba2b5dd9 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -234,6 +234,15 @@ void addLayoutModule()
|
||||
sol::base_classes,
|
||||
sol::bases<Widget, Object, Thing>());
|
||||
|
||||
layout.new_usertype<Label>(
|
||||
"Label",
|
||||
sol::call_constructor,
|
||||
sol::factories([guard](const sol::table &children) {
|
||||
return constructWidgetType<Label>(children, guard);
|
||||
}),
|
||||
sol::base_classes,
|
||||
sol::bases<Widget, Object, Thing>());
|
||||
|
||||
layout.new_usertype<Widget>(
|
||||
"Widget",
|
||||
sol::call_constructor,
|
||||
|
||||
@@ -97,6 +97,14 @@ local pushButton = {}
|
||||
---@return PushButton
|
||||
function layout.PushButton(children) end
|
||||
|
||||
---A Label
|
||||
---@class Label : LayoutItem
|
||||
local label = {}
|
||||
|
||||
---@param children LayoutItem|string|BaseAspect|function
|
||||
---@return Label
|
||||
function layout.Label(children) end
|
||||
|
||||
---A SpinBox
|
||||
---@class SpinBox : LayoutItem
|
||||
local spinBox = {}
|
||||
|
||||
Reference in New Issue
Block a user