Hi,

since your object does not show up in the navigator, but does show up in the 
state editor, I am pretty sure the meta information for your class is somehow 
messed up.
Typically the meta info (type hierarchy properties etc...) is provided by a 
plugins.qmltypes file as part of a QML plugin.
To me it looks like the code model/meta info system does not know your object 
is actually an item. We only show items in the navigator
and also the form editor will only contain items that are identified as items 
by the code model.

Kind Regards,
Thomas Hartmann

________________________________________
From: Qt-creator <[email protected]> on behalf of Wolfgang 
Baron <[email protected]>
Sent: Friday, November 20, 2015 8:45 AM
To: [email protected]
Subject: [Qt-creator] Qml Designer does not always show QQuickItem derived      
C++ classes

Hi,

when I create a Qml exposed C++ class inheriting from QQuickItem in a Qml 
plugin, Objects of this class do not show up in the navigator window, nor in 
the central displaying area of the Qml Designer. There is a small chance, that 
restarting Qt-Creator will get the objects to be shown. They always show up in 
the state editor, no matter whether they show up in the navigator or the 
central displaying area.

This is so, even if the C++ class is just a dummy class without any properties 
of its own. Items nested in the C++ based items only show up, when the 
containing C++ based item is displayed. Debugging messages show, that all 
methods get properly called (constructor, destructor) in all 3 qml2puppet 
processes, even when the item is not displayed.

This does somehow look like QTCREATORBUG-11377, although just importing a 
module containing a C++ based class does not seem to matter and Qml based items 
in the module work just fine. Also, the fact that restarting Qt-Creator may 
cause the Designer to display all items as it should is not mentioned. The 
problem described in QTCREATORBUG-11377 does not mention the state editor 
either.

I find this very strange, because QtQuick classes do the same, only they are 
implemented in the same library as QQuickItem. Is there a way around this or do 
I have to file a bug (or add information to QTCREATORBUG-11377)? Does anybody 
know of a workaround?

Thanks for any insights!
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qt-creator
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qt-creator

Reply via email to