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::base_classes,
|
||||||
sol::bases<Widget, Object, Thing>());
|
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>(
|
layout.new_usertype<Widget>(
|
||||||
"Widget",
|
"Widget",
|
||||||
sol::call_constructor,
|
sol::call_constructor,
|
||||||
|
|||||||
@@ -97,6 +97,14 @@ local pushButton = {}
|
|||||||
---@return PushButton
|
---@return PushButton
|
||||||
function layout.PushButton(children) end
|
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
|
---A SpinBox
|
||||||
---@class SpinBox : LayoutItem
|
---@class SpinBox : LayoutItem
|
||||||
local spinBox = {}
|
local spinBox = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user