QML Text item + OSX
-
Greetings Dev Forum,
I'm using dynamically loaded QML components in my application. I'm in 4.7.1.
On OSX my Text items does not seem to be visible when doing so. However if I reload the view once they suddently appear.
This is specific to OSX and my Text items are always visible on Windows.Moreover I've reimplemented my own QML Text component. When adding the following line at the end of my componentComplete() function everything works fine again: @setFlag(QGraphicsItem::ItemHasNoContents, false);@
Has anyone got a clue about this ?
-
As far as I remember from a DevDays presentation a few years ago, setting this flag is a must (at least on the C++ side, but I doubt it to be different in QML/Quick), otherwise it will be invisible/not drawn.
-
Yes.
That does not explain why I get this odd behavior with Qt's Text Component though.
-
Do you have a sample that demonstrates the problem?
-
Not yet. I'll try to come up with something :).
-
Do you have same problem with other text objects like TextInput or TextEdit?
-
It sounds like a bug if Text items are not visible when first created. Could you please file a bug with an example at bugreports.qt.nokia.com?