Quote Originally Posted by wysota View Post
Why would you use createQmlObject for such thing?
Because the documentation states that this is only one of two options.

src: https://qt-project.org/doc/qt-5-snap...tcreation.html

So Qt.createComponent looks like some overkill when i just want to add some ToolButton.


Quote Originally Posted by wysota View Post
Did you try splitting your component definition into multiple lines to avoid the semicolon after the import statement?
Why should i? The documentation does the same in it's examples.
https://qt-project.org/doc/qt-5-snap...-string-of-qml

Quote Originally Posted by wysota View Post
Hard to say without knowing what documentation you mean.
http://doc.qt.io/qt-5/index.html
https://qt-project.org/doc/qt-5-snap...s-toolbar.html

Quote Originally Posted by wysota View Post
Yes. Use the QML debugger and analyzer that comes with Qt Creator. However your errors are very simple so there is no need to use a debugger to avoid them.
Nice to hear that they are simple, yet i found no reference to what they mean.