Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML Text item + OSX
Forum Updated to NodeBB v4.3 + New Features

QML Text item + OSX

Scheduled Pinned Locked Moved QML and Qt Quick
7 Posts 4 Posters 3.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bunjee
    wrote on last edited by
    #1

    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 ?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      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.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bunjee
        wrote on last edited by
        #3

        Yes.

        That does not explain why I get this odd behavior with Qt's Text Component though.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          Do you have a sample that demonstrates the problem?

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bunjee
            wrote on last edited by
            #5

            Not yet. I'll try to come up with something :).

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mohsen
              wrote on last edited by
              #6

              Do you have same problem with other text objects like TextInput or TextEdit?

              1 Reply Last reply
              0
              • B Offline
                B Offline
                blam
                wrote on last edited by
                #7

                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?

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved