Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    [Solved]Rounded corners of outer most frame

    General and Desktop
    qml round radiu
    2
    4
    2552
    Loading More Posts
    • 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.
    • P
      PP99 last edited by PP99

      Is it possible to achieve rounded corners at the outermost frame? I have managed to remove Windows default border, menu bar, title etc.
      I am trying to achieve it using QML, Background image, Rectangle and its property:Radius. I use a rectangle as child of item and get the effect however I want the main container to be curved at corners. Want to achieve this .
      I am just starting out on Qt. Thanks for your time.

      p3c0 1 Reply Last reply Reply Quote 0
      • p3c0
        p3c0 Moderators @PP99 last edited by

        Hi @PP99 and Welcome,
        Try out the following:

        import QtQuick 2.4
        import QtQuick.Window 2.2
        
        Window {
            width: 400
            height: 400
            flags: Qt.FramelessWindowHint
            color: "transparent"
        
            Rectangle {
                x: 10
                y: 10
                width: parent.width-20
                height: parent.height-20
                radius: 15
            }
        }
        

        157

        1 Reply Last reply Reply Quote 1
        • P
          PP99 last edited by

          Thank you very much. It works.

          p3c0 1 Reply Last reply Reply Quote 0
          • p3c0
            p3c0 Moderators @PP99 last edited by

            @PP99 You're Welcome :). Please mark the post as solved. You will need to edit the post title and prepend [Solved].

            157

            1 Reply Last reply Reply Quote 0
            • First post
              Last post