Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-10601 Figma Bridge: Support Figma Component Properties
  3. QDS-10663

Figma Bridge: Support Figma's built-in Boolean Properties

    XMLWordPrintable

Details

    Description

      See the attached Figma project. The visibility of the 2 red squares (rLeft and rRight) are linked to a Boolean property ("comprehensive"):

       

      Qt Bridge for Figma currently ignores this property. It should auto-convert it to QML code like this:

      // MyWidget.ui.qml
      import QtQuick
      
      Rectangle {
          id: myWidget
          property bool comprehensive: true
          // ...
          
          Rectangle {
              id: rRight
              visible: myWidget.comprehensive
              // ...
          }
      
          Rectangle {
              id: rMid
              // ...
          }
      
          Rectangle {
              id: rLeft
              visible: myWidget.comprehensive
              // ...
          }
      }
      

       

      Workarounds

      The current version of Qt Bridge for Figma requires us to implement this type of functionality by either creating a Variant (which is unwieldy), or by manually typing these property bindings into the plugin (which is unwieldy, hard to maintain, AND error-prone):

      Attachments

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

        Activity

          People

            algerman Aleksei German
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes