Package qtuiloader
provides
functions for dynamically creating widgets
from the user interface files created by program
Qt Designer.
This is achieved by providing bindings for the Qt class
QUiLoader.
Directory ${
_TorchInstallDir=}/share/lua/5.1/qtuiloader=
contains a small demonstration of this package.
Use program
Qt Designer
to examine file test.ui
.
Then load file test.lua
into the
qlua program.
$ cd /usr/local/share/lua/5.1/qtuiloader
$ /usr/local/bin/qlua
Lua 5.1 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> dofile('test.lua')
Package qtuiloader
provides a few convenience functions.
Function qtuiloader.loader returns a
preallocated instance of class qt.QUiLoader.
Function qtuiloader.load uses
this preallocated loader to construct a widget using a
Qt Designer
user interface description.
Expression qtuiloader.availableWidgets()
returns a
qt.QStringList
containing the names of the supported widget classes.
Creates a widget of class classname
.
Argument classname
can be any of the strings returned
by qtuiloader.availableWidgets()
.
The optional argument parent
specifies the parent widget
and the optional argument name
specifies the
object name.
When argument parent
is nil
or not specified,
the new widget is owned by the Lua interpreter
and is automatically destroyed when the garbage collector
determines that it is no longer referenced.
Expression qtuiloader.load(filename,parent)
dynamically
constructs and returns the widget described by the
Qt Designer
file filename
.
When argument parent
is nil
or not specified,
the new widget is owned by the Lua interpreter
and is automatically destroyed when the garbage collector
determines that it is no longer referenced.
Expression qtuiloader.loader()
returns a preallocated instance
of class qt.QUiLoader.
Class qt.QUiLoader
provides bindings
for all the functions of the Qt class
QUiLoader.
To be documented further...