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

Width and Height Not Set Correctly for BasicSwitch Component in Figma Import

    XMLWordPrintable

Details

    Description

      When dragging and dropping the BasicSwitch component from QDS, the width and height values are not set, resulting in the component area not being defined correctly. The size attributes of the BasicSwitch component are still set to zero even when accessing the component. This issue appears to be related to the way size properties are handled in the component code.

       

      Steps to Reproduce:

      1) When dragging and dropping the BasicSwitch component from QDS into the 2D view, the width and height values are not set, causing the component area to remain undefined.

       

      2) Even when accessing the BasicSwitch component, the size values are still set to 0. Examining the code related to size reveals differences compared to other components. For the switch component, the code is written as follows:

      implicitWidth: background.implicitWidth
      implicitHeight: background.implicitHeight

       

      3)Annotate this code, which is associated with an existing size

      implicitWidth: background.implicitWidth
      implicitHeight: background.implicitHeight

      When I change the code on the switch, like the size-related code of other components

      implicitWidth: background.width
      implicitHeight: background.height

       

      4)When tested, it works correctly in QDS.

      I wonder if the QDS file I sent actually works on the MCU project or not. When I created the MCU project using the Figma template, it works within the QDS. But it doesn't work when I actually build the MCU project.

      If so, how should MCU project proceed with QDS?

      Attachments

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

        Activity

          People

            thohartm Thomas Hartmann
            sophie_lee Sophie Lee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes