Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Sorting QML property based on coding convention

Sorting QML property based on coding convention

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
1 Posts 1 Posters 172 Views
  • 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.
  • C Offline
    C Offline
    Claude SC
    wrote on last edited by
    #1

    Hi,
    Does QtCreator have a tool to automatically sort Property to respect the coding convention? I know it exist for CSS language. Let's say I have:

    Image {
        source: "qrc:/Resources.png"
        fillMode: Image.PreserveAspectFit
        anchors.rightMargin: 20
        id: myId
        anchors.bottom: id.bottom
        anchors.right: id.right
        anchors.bottomMargin: 20
        width: parent.width *0.1
        MouseArea{
            anchors.fill: parent
            onClicked: {
                if(root.state=== modelData.index)
                    root.state= -1
                else
                    root.state= modelData.index
            }
        }
    }
    

    I would like to have a tool that would automatically sort the types in the file like something like this:

    Image {
        id: myId
    
        source: "qrc:/Resources.png"
        fillMode: Image.PreserveAspectFit
        width: parent.width *0.1
        anchors.bottom: id.bottom
        anchors.right: id.right
        anchors.bottomMargin: 20
        anchors.rightMargin: 20
       
        MouseArea{
            anchors.fill: parent
    
            onClicked: {
                if(root.state=== modelData.index)
                    root.state= -1
                else
                    root.state= modelData.index
            }
        }
    }
    

    Thanks!

    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