Skip to content

Instantly share code, notes, and snippets.

@chipolux
Last active March 2, 2017 18:00
Show Gist options
  • Save chipolux/d442c83a842cbc2442f0456deb270d1b to your computer and use it in GitHub Desktop.
Save chipolux/d442c83a842cbc2442f0456deb270d1b to your computer and use it in GitHub Desktop.
Simple EGLFS ComboBox Example (Works With Raspberry Pi and LeanDog PyQt 5.7)
import sys
from PyQt5.QtCore import QUrl
from PyQt5.QtGui import QGuiApplication
from PyQt5.QtQuick import QQuickView
app = QGuiApplication(sys.argv)
view = QQuickView()
view.setSource(QUrl('./test.qml'))
view.show()
app.exec_()
import QtQuick 2.1
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.0
Item {
id: display
width: 800
height: 480
RowLayout {
Button {
text: "Ok"
}
ComboBox {
model: ["1", "2", "3"]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment