Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. I can't open .qml in vscode
Forum Updated to NodeBB v4.3 + New Features

I can't open .qml in vscode

Scheduled Pinned Locked Moved Solved Qt for Python
8 Posts 2 Posters 1.3k Views
  • 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.
  • T Offline
    T Offline
    Trent Treborn
    wrote on 12 Jan 2024, 11:57 last edited by
    #1

    I have python 3.11.4, I have qt 6.6.1 and qt quick installed, I have pyside6, I have the 'qt for python', 'qt tools' extensions, I tried installing almost all 'qml' extensions, none of them worked. I tried adding the paths of executables related to qml to the environment variables:

    D:\Qt\6.6.1\mingw_64\bin
    D:\Qt2\Tools\QtDesignStudio\qt6_design_studio_reduced_version\bin

    it didn't work. I don't know what to do...

    I installed qt in the D:\Qt folder and the qt quick extension in the D:\Qt2 folder because it wouldn't allow it to be installed in the same folder. I don't know if I should install it in a specific folder within D:\Qt, but I added the D:\Qt2 bin path to the environment variables too

    I even tried adding these paths:

    "qtForPython.qml.path": "D:/Qt/6.6.1/mingw_64/qml",

    "qtForPython.qmlformat.path": "D:/Qt/6.6.1/mingw_64/bin/qmlformat.exe"

    to settings.json, nothing changed:

    Expected token `numeric literal'

    There is nothing written in the .qml file and it does not recognize it

    J 1 Reply Last reply 12 Jan 2024, 12:52
    0
    • T Trent Treborn
      12 Jan 2024, 11:57

      I have python 3.11.4, I have qt 6.6.1 and qt quick installed, I have pyside6, I have the 'qt for python', 'qt tools' extensions, I tried installing almost all 'qml' extensions, none of them worked. I tried adding the paths of executables related to qml to the environment variables:

      D:\Qt\6.6.1\mingw_64\bin
      D:\Qt2\Tools\QtDesignStudio\qt6_design_studio_reduced_version\bin

      it didn't work. I don't know what to do...

      I installed qt in the D:\Qt folder and the qt quick extension in the D:\Qt2 folder because it wouldn't allow it to be installed in the same folder. I don't know if I should install it in a specific folder within D:\Qt, but I added the D:\Qt2 bin path to the environment variables too

      I even tried adding these paths:

      "qtForPython.qml.path": "D:/Qt/6.6.1/mingw_64/qml",

      "qtForPython.qmlformat.path": "D:/Qt/6.6.1/mingw_64/bin/qmlformat.exe"

      to settings.json, nothing changed:

      Expected token `numeric literal'

      There is nothing written in the .qml file and it does not recognize it

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 12 Jan 2024, 12:52 last edited by
      #2

      @Trent-Treborn What exactly does not work?
      QML files are simple text files.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      T 1 Reply Last reply 12 Jan 2024, 13:15
      0
      • J jsulm
        12 Jan 2024, 12:52

        @Trent-Treborn What exactly does not work?
        QML files are simple text files.

        T Offline
        T Offline
        Trent Treborn
        wrote on 12 Jan 2024, 13:15 last edited by
        #3

        @jsulm It's as if vscode didn't recognize .qml as a valid extension and didn't compile it. But I have already installed several qml extensions. I found the installation management and I'm going to try to install all the Qt quick 3d files in the same folder but I don't think that's the problem

        J 1 Reply Last reply 12 Jan 2024, 13:20
        0
        • T Trent Treborn
          12 Jan 2024, 13:15

          @jsulm It's as if vscode didn't recognize .qml as a valid extension and didn't compile it. But I have already installed several qml extensions. I found the installation management and I'm going to try to install all the Qt quick 3d files in the same folder but I don't think that's the problem

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 12 Jan 2024, 13:20 last edited by
          #4

          @Trent-Treborn Still not sure what the problem is. QML is not compiled but interpreted (you can compile QML if you have commercial license, but it is not necessary).

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          T 2 Replies Last reply 12 Jan 2024, 13:27
          0
          • J jsulm
            12 Jan 2024, 13:20

            @Trent-Treborn Still not sure what the problem is. QML is not compiled but interpreted (you can compile QML if you have commercial license, but it is not necessary).

            T Offline
            T Offline
            Trent Treborn
            wrote on 12 Jan 2024, 13:27 last edited by
            #5

            @jsulm qml_error.jpg

            J 1 Reply Last reply 12 Jan 2024, 14:26
            0
            • J jsulm
              12 Jan 2024, 13:20

              @Trent-Treborn Still not sure what the problem is. QML is not compiled but interpreted (you can compile QML if you have commercial license, but it is not necessary).

              T Offline
              T Offline
              Trent Treborn
              wrote on 12 Jan 2024, 13:40 last edited by
              #6

              @jsulm installed.jpg

              1 Reply Last reply
              0
              • T Trent Treborn
                12 Jan 2024, 13:27

                @jsulm qml_error.jpg

                J Offline
                J Offline
                jsulm
                Lifetime Qt Champion
                wrote on 12 Jan 2024, 14:26 last edited by
                #7

                @Trent-Treborn What happens if you put some valid QML code into the file?

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                T 1 Reply Last reply 12 Jan 2024, 15:09
                0
                • J jsulm
                  12 Jan 2024, 14:26

                  @Trent-Treborn What happens if you put some valid QML code into the file?

                  T Offline
                  T Offline
                  Trent Treborn
                  wrote on 12 Jan 2024, 15:09 last edited by
                  #8

                  @jsulm lol thank you very much. I would never imagine that it would be because the file was empty. By default this usually doesn't happen and when you open a file and there's an error it's because something isn't working, so I thought it wouldn't even workwindow.jpg

                  1 Reply Last reply
                  0
                  • T Trent Treborn has marked this topic as solved on 12 Jan 2024, 15:09

                  1/8

                  12 Jan 2024, 11:57

                  • Login

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