Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75493

QPickingSettings does not export revision 10 to QML

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.12.3
    • Qt3D
    • None
    • Xubuntu 18.04
      QTCreator 4.9
      Qt 5.12.0, 5.12.3
    • Android, Linux/X11

    Description

      QPickingSettings has a property "worldSpaceTolerance" which is only available in metaobject revision 10. However, the type registration in src/quick3d/imports/render/qt3dquick3drenderplugin.cpp does not contain an entry for revision 10. In 5.12.3 we have started to actually enforce the versioning for grouped properties. Therefore you don't get away with this anymore by just accessing the pickingSettings as grouped property from RenderSettings.

      The original symptom was this:

      During migration from Qt v5.12.0 to v5.12.3 I found a bug with worldSpaceTolerance - in Qt 5.12.0 and QtCreator 4.8 it was marked as error: `Invalid property name "worldSpaceTolerance". (M16)`, but works fine during the run. Now in QtCreator 4.9 and both Qt 5.12.0 & 5.12.3 it's also marked as error, but not working in runtime anymore.

      import QtQuick 2.12
      import QtQuick.Scene3D 2.12
      
      import Qt3D.Core 2.12
      import Qt3D.Render 2.12
      import Qt3D.Input 2.12
      import Qt3D.Extras 2.12
      
      ...
      
          Entity {
              ...
              components: [
                  RenderSettings {
                      activeFrameGraph: ForwardRenderer {
                          clearColor: "#444444"
                          camera: camera
                      }
      
                      pickingSettings.pickMethod: PickingSettings.PointPicking
                      pickingSettings.faceOrientationPickingMode: PickingSettings.FrontAndBackFace
                      pickingSettings.pickResultMode: PickingSettings.NearestPick
                      pickingSettings.worldSpaceTolerance: 0.01
              ...
      

      Seems like something is changed in QtCreator versions and now worldSpaceTolerance is showing the next error in runtime for both 5.12.0 & 5.12.3:

      W QtApplication: qrc:/Test.qml:78 ".worldSpaceTolerance" is not available due to component versioning.
      

      Unfortunately I don't know how to properly downgrade the QtCreator from Maintenance Tool, but hopefully can reinstall or unpack it manually.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            seanharmer Sean Harmer
            rabits Rabit
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes