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

Implement mirror functionality for QML items

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • None

    Description

      Make it possible to flip/mirror items horizontal/vertical. See the attached demo project.

      function flipH(flip : bool, width : real) {
          if (flip)
              root.flipHorizontalMat = Qt.matrix4x4(-1, 0, 0, width,
                                                      0, 1, 0, 0,
                                                      0, 0, 1, 0,
                                                      0, 0, 0, 1)
          else
              root.flipHorizontalMat = Qt.matrix4x4()
      }
      
      function flipV(flip : bool, height : real) {
          if (flip)
              root.flipVerticalMat = Qt.matrix4x4(1, 0, 0, 0,
                                                  0, -1, 0, height,
                                                  0, 0, 1, 0,
                                                  0, 0, 0, 1)
          else
              root.flipVerticalMat = Qt.matrix4x4()
      }
      

      Attachments

        Activity

          People

            henning Henning Gründl
            henning Henning Gründl
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: