Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
QmlSlidePrinter
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Winkelmann
QmlSlidePrinter
Commits
2f4d68e9
Commit
2f4d68e9
authored
Nov 20, 2018
by
Michael Winkelmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Microseconds delay
parent
f4013bf0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
main.cpp
main.cpp
+4
-3
No files found.
main.cpp
View file @
2f4d68e9
...
...
@@ -24,7 +24,8 @@ int main(int ac, char *av[]) {
{{
"output"
,
"o"
},
"Output PDF file"
,
"output"
,
"output.pdf"
},
{{
"importpath"
,
"I"
},
"QML import path"
,
"importpath"
},
{{
"show-pdf"
,
"p"
},
"Show PDF file"
,
"show-qml"
},
{{
"show-qml"
,
"q"
},
"Show QML Output"
,
"show-pdf"
}
{{
"show-qml"
,
"q"
},
"Show QML Output"
,
"show-pdf"
},
{{
"delay"
,
"D"
},
"Delay in milliseconds"
,
"delay"
,
"0"
}
});
parser
.
process
(
app
);
...
...
@@ -33,6 +34,7 @@ int main(int ac, char *av[]) {
auto
outputPdf
=
parser
.
value
(
"output"
);
auto
showPdf
=
parser
.
isSet
(
"show-pdf"
);
auto
showQml
=
parser
.
isSet
(
"show-qml"
);
auto
delay
=
parser
.
value
(
"delay"
).
toInt
();
QDir
outputPdfDir
;
...
...
@@ -57,8 +59,7 @@ int main(int ac, char *av[]) {
if
(
showQml
)
view
->
show
();
QTimer
::
singleShot
(
10000
,[
=
]()
{
QTimer
::
singleShot
(
delay
,[
=
]()
{
QmlPrinter
printer
;
qInfo
()
<<
QObject
::
tr
(
"Writing PDF to %1"
).
arg
(
outputPdfDir
.
absolutePath
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment