Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Smoothly rotate a Rectangle in QML
Forum Updated to NodeBB v4.3 + New Features

Smoothly rotate a Rectangle in QML

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 2 Posters 4.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    imihajlov
    wrote on last edited by
    #1

    I need to make a rectangle and rotate it a bit (5-10 degrees), but I'm getting a weird non-smooth result.
    Is it a way to make it smooth?
    QML code:
    @Rectangle {
    smooth: true
    transform: Rotation {
    angle: 5
    }
    }@

    Setting or removing smooth does nothing. Setting or removing any of render hints does nothing.
    I'm using Qt 4.8.1 on Linux.

    1 Reply Last reply
    0
    • U Offline
      U Offline
      utcenter
      wrote on last edited by
      #2

      You mean the jagged edges? You should set the antialiasing property, not smooth.

      1 Reply Last reply
      0
      • I Offline
        I Offline
        imihajlov
        wrote on last edited by
        #3

        How can I set the antialiasing property?

        1 Reply Last reply
        0
        • U Offline
          U Offline
          utcenter
          wrote on last edited by
          #4

          @Rectangle {
          ...
          antialiasing: true
          }@

          1 Reply Last reply
          1
          • I Offline
            I Offline
            imihajlov
            wrote on last edited by
            #5

            Cannot assign to non-existent property "antialiasing". As expected.

            1 Reply Last reply
            0
            • U Offline
              U Offline
              utcenter
              wrote on last edited by
              #6

              Ah, you are using Qt4... it seems there is no such property in QtQuick 1...

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved