0

The Qt Qml extension on VS Code keeps reporting:

/usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick.2/plugins.qmltypes:(row):(column): Meta object revision and export version differ.
Revision (x) corresponds to version 0.(x); it should be 2.0.

This occurs everywhere the line: exportMetaObjectRevisions: [0] is found.

Note: Debian 13 and Qt 5.15 are used.

What I have tried:

  • Defining specific include paths inside the extension's settings
  • changing the number in the problematic line exportMetaObjectRevisions: [0] to 2, 2.0, and "2.0" which didn't work
  • I have tried using qmlplugindump to rebuild it however it reports another error (QtQml.WorkerScript not installed) which belongs in its own question.

Edit: It turns out qt5 doesn't seem to have any form of qmlls, but qt6 does. Any explanations for why it still worked and why it reported these errors will be accepted

2 Answers 2

0
  • Qt’s QML engine and tooling expect meta object revisions in .qmltypes files to match their export version.

  • Your system-installed Qt QML modules (/usr/lib/x86_64-linux- gnu/qt5/qml/QtQuick.2/plugins.qmltypes) have exportMetaObjectRevisions: [0] but the tooling expects it to be [2] (i.e., version 2.0).

  • This inconsistency triggers the warning in VS Code’s QML extension.


To fix or suppress it
Check Qt version compatibility

Make sure the Qt version used by VS Code extension matches the installed Qt version.

  • Run qmake -v or qtpaths --version to see your Qt version.

  • Check the VS Code QML extension documentation or settings for Qt version compatibility.



You can also try reinstalling QT because sometimes Updating or reinstalling QT packages fixes the mismatches.

Sign up to request clarification or add additional context in comments.

1 Comment

This sounds like an answer written by AI. Be careful trusting anything that is AI-generated.
0

As it turns out: I hadn't properly told the extension where to find qmlls. It's not in the path it would expect it to be, but it was actually in /usr/bin/qmlls6. After setting the custom exe path to that, I got no more errors

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.