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

Qt Bridge for Figma cannot handle ternary operator correctly

XMLWordPrintable

    • 6ee74d2ce9952f64cc01702a217597516d1d95c3
    • QDS Berlin - 2024 Week 31/32

      Sample .fig project attached. Export the component and specify the following in "Home -> Properties":

      property int myInt: width > 100 ? 200 : 50
      

      Something similar should also reproduce the issue, as long as it contains ternary operator. It is exported as

      myInt: "width > 100 ? 200 : 50"
      

      which makes no sense at all.

      The problem lies in ternary operator itself. Simple comparison works just fine. For example,

      property bool myBool: width > 100
      

      is exported as

      property bool myBool: true
      

      (Actually, it is not that perfect either since width may not be always larger than 100 but this bug report is mainly about ternary operator).

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

            vikas Vikas Pachdha
            luqiaochen Luqiao Chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes