Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.
/ qml-widgets Public archive

QtWidgets QML module

Notifications You must be signed in to change notification settings

bjorn/qml-widgets

Repository files navigation

QtWidgets QML module

This module provides experimental bindings for the QtWidgets module to QML. The idea was to see whether it's feasible to create traditional QtWidget-based applications based on the Qt QML engine.

Example

import QtQml 2.12
import QtWidgets 5.12

MainWindow {
    id: mainWindow
    windowTitle: qsTr("Hello World")

    centralWidget: Widget {
        layout: VBoxLayout {
            PushButton {
                text: qsTr("Open File...")
                onClicked: saveAsButton.visible = !saveAsButton.visible
            }
            PushButton {
                id: saveAsButton
                text: qsTr("Save As...")
            }
            PushButton {
                text: qsTr("Quit")
                onClicked: Qt.quit();
            }

            HBoxLayout {
                spacing: 50

                PushButton {
                    text: qsTr("Previous")
                }
                PushButton {
                    text: qsTr("Next")
                }
            }
        }
    }

    Component.onCompleted: visible = true
}

Declarative Widgets

It turned out there already was a project aiming to do the exact same thing: KDAB/DeclarativeWidgets. Hence I'm archiving this repository and would suggest anybody interested in this approach to look over there.

About

QtWidgets QML module

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published