Skip to content

Commit d21cea1

Browse files
proof of concept
1 parent d463d9c commit d21cea1

File tree

5 files changed

+47
-1
lines changed

5 files changed

+47
-1
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.user
2+
*.o
3+
build
4+
bin
5+
*.autosave

build.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
git submodule init
2+
git submodule update
3+
rm -rf build
4+
mkdir build
5+
cd build
6+
qmake ../shorty
7+
make

render.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dev/bin/shorty dev/simple_screenshot.qml tests/Render/ScreenshotTest/ElementLoading.qml
2+
dev/bin/shorty dev/simple_screenshot.qml tests/Render/ScreenshotTest/PropertyGrid.qml
3+
dev/bin/shorty dev/simple_screenshot.qml tests/Render/ScreenshotTest/PropertyRectangle.qml
4+
dev/bin/shorty dev/simple_screenshot.qml tests/Render/ScreenshotTest/RectangleColorre.qml

shorty

simple_screenshot.qml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import QtQuick 2.5
2+
import QtQuick.Window 2.0
3+
Loader{
4+
source: "../" + script
5+
Component.onCompleted: {
6+
console.log("completed")
7+
console.log(script)
8+
timer.start()
9+
10+
}
11+
12+
function grab(){
13+
14+
var path = source.toString()
15+
.replace(".qml", ".png")
16+
.replace("file://", "")
17+
console.log("grab" + path)
18+
shorty.shootFull(path)
19+
}
20+
Timer{
21+
id: timer
22+
interval: 10
23+
onTriggered: {
24+
grab()
25+
Qt.quit()
26+
}
27+
}
28+
}
29+
30+

0 commit comments

Comments
 (0)