forked from qt-creator/qt-creator
LUA: Add Widget close() method to Gui bindings
Change-Id: I48d32c2fc9c65010be1bb7a340faebedc4ce3f4a Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -746,6 +746,11 @@ void Widget::activateWindow()
|
||||
access(this)->activateWindow();
|
||||
}
|
||||
|
||||
void Widget::close()
|
||||
{
|
||||
access(this)->close();
|
||||
}
|
||||
|
||||
QWidget *Widget::emerge() const
|
||||
{
|
||||
return access(this);
|
||||
|
@@ -230,6 +230,7 @@ public:
|
||||
void setNormalMargins(int = 0);
|
||||
void setContentsMargins(int left, int top, int right, int bottom);
|
||||
void activateWindow();
|
||||
void close();
|
||||
};
|
||||
|
||||
class QTCREATOR_UTILS_EXPORT Label : public Widget
|
||||
|
@@ -368,6 +368,8 @@ void setupGuiModule()
|
||||
&Widget::show,
|
||||
"activateWindow",
|
||||
&Widget::activateWindow,
|
||||
"close",
|
||||
&Widget::close,
|
||||
sol::base_classes,
|
||||
sol::bases<Object, Thing>());
|
||||
|
||||
|
@@ -41,6 +41,9 @@ function gui.widget:show() end
|
||||
---Sets the top-level widget containing this widget to be the active window. (see [QWidget::activateWindow](https://doc.qt.io/qt-5/qwidget.html#activateWindow))
|
||||
function gui.widget:activateWindow() end
|
||||
|
||||
---Closes the widget. (see [QWidget::close](https://doc.qt.io/qt-5/qwidget.html#close))
|
||||
function gui.widget:close() end
|
||||
|
||||
---Column layout
|
||||
---@class Column : Layout
|
||||
local column = {}
|
||||
|
Reference in New Issue
Block a user