flib:
- Ability to pass raw data via IPC
qmlfrontend:
- Pass message received by callback through event loop to handle it in main thread
- Get preview image from engine on button click and render it in Image object
import QtQuick 2.0
import Hedgewars.Engine 1.0
Rectangle {
width: 400
height: 400
HWButton {
id: hwbutton1
x: 8
y: 66
width: 166
height: 158
onClicked: {
HWEngine.run()
}
Connections {
target: HWEngine
onPreviewImageChanged: previewImage.source = "image://preview/1"
}
}
HWButton {
id: hwbutton2
x: 192
y: 66
width: 200
height: 139
}
Image {
id: previewImage
x: 70
y: 250
width: 256
height: 128
cache: false
}
}