Skip to content

osch/lua-lqtk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lqtk - Lua Qt Toolkit

Licence Install

A Lua binding for Qt 6.9 and Qt 6.10.

This is work in progress. You may have a look at the Examples.

First Example

  • A simple "Hello World" dialog.

    Screenshot example01

    local lqtk = require("lqtk")
    
    lqtk.import()
    
    QApplication(arg)
    
    local window = QWidget() do
        local label  = QLabel("Hello World!") do
            local font = QFont()
            font:setPointSize(2 * font:pointSize())
            label:setFont(font)
            label:setAlignment(Qt.AlignCenter)
        end
        local buttons = QDialogButtonBox() do
            buttons:setCenterButtons(true)
            local button = buttons:addButton(QDialogButtonBox.Ok) do
                button:connect("clicked()", function() 
                    QApplication.exit() 
                end)
            end
        end
        local layout = QVBoxLayout(window) do
            layout:addWidget(label)
            layout:addWidget(buttons)
        end
    end
    window:show()
    
    QApplication.exec()

Releases

No releases published

Packages

No packages published

Languages