diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-03-19 11:24:04 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-03-19 11:32:31 +0000 |
commit | c72f97b8af1b7265fb7075e5b4fe41889e133345 (patch) | |
tree | 93c197c51c999d684d4f97a06ccb6d0e217fd563 /tools | |
parent | e8087a36eb59db31b5fcbe8345938e957acd3ed6 (diff) |
Add support for EmitSignal in actions
This is just a way to notify the user application code about something
happening. Hook it up to a signal in Q3DSEngine (for private API users)
and Q3DSPresentation (public API). The node path is omitted since the
concept of 3DS1 horrible absolute paths is not desirable in 2.0 and
there is nothing one can do with it in the public API anyway.
Demonstrate it in the simpleqml example and actionevent.uip.
Change-Id: I3096ffc20ab5a401195a4da4e4f37208e571ab6c
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/q3dsviewer/main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/q3dsviewer/main.cpp b/tools/q3dsviewer/main.cpp index f5d626a..7ecf472 100644 --- a/tools/q3dsviewer/main.cpp +++ b/tools/q3dsviewer/main.cpp @@ -100,6 +100,9 @@ int main(int argc, char *argv[]) if (!engine->setSource(fn.first())) return 0; + QObject::connect(engine.data(), &Q3DSEngine::customSignalEmitted, engine.data(), + [](const QString &s) { qDebug("Got custom signal %s", qPrintable(s)); }); + QScopedPointer<Q3DStudioMainWindow> mw; if (noWidgets) { if (fullscreen) |