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. Qt dimension
Qt 6.11 is out! See what's new in the release blog

Qt dimension

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.1k 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.
  • B Offline
    B Offline
    blackbelt
    wrote on last edited by
    #1

    Coming from android, when I work with graphics element like layout, I can express its width and height in relation to its content (wrap_content). It there something like this in Qt? Or the geometry has to be expressed in pixels?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Depends whether you talk about QtWidgets or QtQuick UIs. In general - it's pixels. In widgets, when you use layouts, the layout system will calculate everything for you automatically, there is no need to set dimensions explicitly.

      (Z(:^

      1 Reply Last reply
      0
      • B Offline
        B Offline
        blackbelt
        wrote on last edited by
        #3

        thank you. I am using stuff like QHBoxLayout, QComboBox, etc. what about it

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          Then it should be done for you automatically :) If the text in text widgets doesn't wrap around, set the "wordWrap" property to true.

          (Z(:^

          1 Reply Last reply
          0
          • B Offline
            B Offline
            blackbelt
            wrote on last edited by
            #5

            I will try it. Thank you

            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