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. How could I apply dynamic text translation on QQuickItem ?
Forum Updated to NodeBB v4.3 + New Features

How could I apply dynamic text translation on QQuickItem ?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 2 Posters 586 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.
  • thamT Offline
    thamT Offline
    tham
    wrote on last edited by tham
    #1

    Qt5.10 introduce a new way to do dynamic translation as this post mentioned, but that solution need QQmlEngine, could I translate the text like that if load the qml by QQuickItem?

    Edit : Not QQuickItem by QQuickWidget

    sierdzioS 1 Reply Last reply
    0
    • thamT tham

      Qt5.10 introduce a new way to do dynamic translation as this post mentioned, but that solution need QQmlEngine, could I translate the text like that if load the qml by QQuickItem?

      Edit : Not QQuickItem by QQuickWidget

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @tham said in How could I apply dynamic text translation on QQuickItem ?:

      if load the qml by QQuickItem?

      How do you load QML via QQuickItem? Please share some code.

      (Z(:^

      1 Reply Last reply
      1
      • thamT Offline
        thamT Offline
        tham
        wrote on last edited by tham
        #3

        I use QQuickWidget to load the qml, after that use rootObject to access QQuickItem.

        ui->quickWidget->setSource(QStringLiteral("qrc:/SomeSortOfFile.qml"));
        root_ = ui->quickWidget->rootObject();
        
        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          Well, then your QQmlEngine is in your QQuickWidget. See the docs.

          (Z(:^

          1 Reply Last reply
          2

          • Login

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