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. [solved] How to change line spacing in Flow?
Forum Updated to NodeBB v4.3 + New Features

[solved] How to change line spacing in Flow?

Scheduled Pinned Locked Moved QML and Qt Quick
7 Posts 4 Posters 3.0k 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.
  • M Offline
    M Offline
    moo1
    wrote on last edited by
    #1

    Does anyone know if it is possible to change line spacing in Flow element? As far as I understood, spacing property is to set the gap between items, but not the gap between lines.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      situ117
      wrote on last edited by
      #2

      If there is no direct way to do it, you can try it by leaving some dummy space with each item. For e.g.

      @
      import QtQuick 1.0

      Rectangle {
      width: 50
      height: 300

      Flow {
          width: 50
          Item {
              width: 50; height: 60 //Extra height
              Rectangle {
                  height: 50
                  width: 50
                  color: "blue"
              }
          }
          
          
          Item {
              width: 50; height: 60
              Rectangle {
                  height: 50
                  width: 50
                  color: "black"
              }
          }  
          
      }
      

      }
      @

      So there is a difference of 10 between each line.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        moo1
        wrote on last edited by
        #3

        Thanks for the workaround. It worked for me! In my case, I wanted to shrink the line spacing, but the same trick to adjust items' height worked.

        Still, it's nice to have a dedicated property - e.g. "linespacing".

        1 Reply Last reply
        0
        • S Offline
          S Offline
          situ117
          wrote on last edited by
          #4

          Glad it worked for you ! Please mark the post as solved.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            moo1
            wrote on last edited by
            #5

            To change to "solved", is there any button to press to change the status, or manually edit the title?

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mario
              wrote on last edited by
              #6

              Just add a tag "solved", that's it

              1 Reply Last reply
              0
              • D Offline
                D Offline
                DenisKormalev
                wrote on last edited by
                #7

                Also it will be good to add [solved] to title. Manually of course

                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