Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to make the QLABEL words space to be smaller
Forum Updated to NodeBB v4.3 + New Features

How to make the QLABEL words space to be smaller

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 308 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.
  • nicker playerN Online
    nicker playerN Online
    nicker player
    wrote on last edited by
    #1

    I put the text into the QLABEL ,
    I adjusted the size by using the stylesheet.But it seemed too wide between the words(not the line height or margins of the qlabel),So how to fix the problem?
    the setIndent() seemed unuseful.

    sierdzioS 1 Reply Last reply
    0
    • nicker playerN nicker player

      I put the text into the QLABEL ,
      I adjusted the size by using the stylesheet.But it seemed too wide between the words(not the line height or margins of the qlabel),So how to fix the problem?
      the setIndent() seemed unuseful.

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @nicker-player you can set a different word spacing for your font: https://doc.qt.io/qt-6/qfont.html#setWordSpacing

      (Z(:^

      nicker playerN 1 Reply Last reply
      0
      • sierdzioS sierdzio

        @nicker-player you can set a different word spacing for your font: https://doc.qt.io/qt-6/qfont.html#setWordSpacing

        nicker playerN Online
        nicker playerN Online
        nicker player
        wrote on last edited by
        #3

        @sierdzio
        I got it.And if I want to set the word spacing in the stylesheet.What should I do?
        Is there any options to set the word spacing of the qfont style?

        sierdzioS 1 Reply Last reply
        0
        • nicker playerN nicker player

          @sierdzio
          I got it.And if I want to set the word spacing in the stylesheet.What should I do?
          Is there any options to set the word spacing of the qfont style?

          sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          @nicker-player said in How to make the QLABEL words space to be smaller:

          @sierdzio
          I got it.And if I want to set the word spacing in the stylesheet.What should I do?
          Is there any options to set the word spacing of the qfont style?

          I don't think it is possible to do in QSS. The documentation does not mention such possibility.

          (Z(:^

          1 Reply Last reply
          2

          • Login

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