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 to create .ts file for QML in Visual Studio with Qt PlugIn
Qt 6.11 is out! See what's new in the release blog

How to create .ts file for QML in Visual Studio with Qt PlugIn

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 2 Posters 3.9k 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.
  • D Offline
    D Offline
    durocket
    wrote on last edited by
    #1

    I developed my project in Visual Studio with Qt Plugin, the user interface is implemented with QML, all QML files are added into .qrc file and loaded with resource system.
    for example: MyUI.qrc
    <!DOCTYPE RCC><RCC version="1.0">
    <qresource>
    <file>home.qml</file>
    <file>import.qml</file>
    </qresource>
    </RCC>

    then in main.cpp, I tried to load the .qrc file with below code:
    Q_INIT_RESOURCE(MyUI);

    Everything works well, but when I tried to create .ts file with menu item "Qt->Create new Translation File", the text marked with "qstr" can not be extracted from QML file.
    What is the possible solution for this issue?

    Rock Du
    Struggling in QML

    1 Reply Last reply
    0
    • deleted57D Offline
      deleted57D Offline
      deleted57
      wrote on last edited by
      #2

      Hi

      I knwo this thread is very old but just for help other having same issue here a possible workaround:

      http://falsinsoft.blogspot.com/2016/10/qt-on-visual-studio-and-qml-translation.html

      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