Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-29986

Qt Quick Designer offered by Qt Creator cannot create items in .ui.qml so that editor does not reflect code correctly

    XMLWordPrintable

Details

    • Windows

    Description

      Way to reproduce:
      Create a Qt Quick project that "can be opened in Qt Design Studio" from template. So it's essentially a Qt Design Studio project. Then double click the .ui.qml file and QtC should automatically be in design mode. But there can be multiple "Item could not be created" warnings in Navigator, and the 2D editor does not properly show the actual UI.

      What I've tried:
      https://forum.qt.io/topic/124259/item-could-not-be-created
      It partially worked. But still, I cannot get the top-level Rectangle right. Dragging and placing components into 2D editor does not work properly either (I think probably) because of missing top-level Rectangle, that the position of added components is wrong. For example, I aligned "My Text" with 2 other components horizontally, but yet the position is "x: -11; y: 96;" which does not make any sense.

      See the attached screenshots for details.
      In "QtC_Design_Mode", it can be seen that there is a warning ("Item could not be created") related to "rectangle". And in 2D editor on the right side, nothing is styled correctly. Top-level rectangle is 0-sized. And I add "text1" and align it with the other 2 components. But see "Wrongly_Positioned_Component", that it is actually not positioned as expected.

      BTW the project can be previews and built correctly. Also, the same project works well in Qt Design Studio. I suppose the QML emulator that QtC uses is bugged somehow.

      Attachments

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

        Activity

          People

            thohartm Thomas Hartmann
            luqiaochen Luqiao Chen
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes