Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-10437

custom property "left" causes a false name conflict

    XMLWordPrintable

Details

    • All

    Description

      In the attached project, there is a file called "BaseGauge.qml" which has a custom property as follows:

       

      Item {
          property bool left: true
      }

      For whatever reason, this causes an error when live preview was triggered.
      The error is as follows:

       

       

      01:08:08: Starting C:\Qt\Tools\QtDesignStudio\qt6_design_studio_reduced_version\bin\qml2puppet-4.2.0.exe --qml-runtime -I C:/work/qt_for_mcus_study/demos/Automotive/imports -I C:/work/qt_for_mcus_study/demos/Automotive/imports/Automotive C:/work/qt_for_mcus_study/demos/Automotive/BaseGauge.ui.qml "-qmljsdebugger=file:C:/Users/81808/AppData/Local/Temp/QtDesignStudio-ntrlIg/qtc-socket.OvJQsl,block,services:QmlPreview,DebugTranslation"...QML debugging is enabled. Only use this in a safe environment.Info: Starting QML Runtime ((null):0, (null))Warning: CoreApp is not initialized! Falling back to QGuiApplication! ((null):0, (null))Debug: QML Debugger: Connecting to socket C:/Users/81808/AppData/Local/Temp/QtDesignStudio-ntrlIg/qtc-socket.OvJQsl... ((null):0, (null))Warning: QQmlApplicationEngine failed to load component ((null):0, (null))Warning: file:///C:/work/qt_for_mcus_study/demos/Automotive/BaseGauge.ui.qml:35:5: Cannot override FINAL property (file:///C:/work/qt_for_mcus_study/demos/Automotive/BaseGauge.ui.qml:35, (null))Critical: QEventDispatcherWin32::wakeUp: Failed to post a message (ウィンドウ ハンドルが無効です。) ((null):0, (null))qml: Did not load any objects, exiting.01:08:09: C:\Qt\Tools\QtDesignStudio\qt6_design_studio_reduced_version\bin\qml2puppet-4.2.0.exe exited with code 2

      The important part is this:

       

       

      file:///C:/work/qt_for_mcus_study/demos/Automotive/BaseGauge.ui.qml:35:5: Cannot override FINAL property  

      The line 35 is this:

      property bool left: true 

      Now apparently Item has a property called "left" which is marked as "final." 
      Since this is an MCU project, I checked the code of Qt for MCUs 2.5 but there was no "left" property in Item, let alone the one marked with "final".

      But in the standard Qt 6.5, I found this line. (qquickitem.h)

      Q_PRIVATE_PROPERTY(QQuickItem::d_func(), QQuickAnchorLine left READ left CONSTANT FINAL) 

      Now, I'm on the MCU project so this shouldn't bother the user.

      Also, even in the standard Qt project, the error message is too cryptic. If you think about it, the target users of Qt Desgin Studio are UI/UX designers and programmers. I don't think they feel comfortable when seeing the error message like:

      Cannot override FINAL property (file:///C:/work/qt_for_mcus_study/demos/Automotive/BaseGauge.ui.qml:35, (null)) 

      Cryptic error messages are one of the easiest ways to let users hate the product. Please make the error messages clearer to the users too.

       

      Attachments

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

        Activity

          People

            thohartm Thomas Hartmann
            mikio_hirai Mikio Hirai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes