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
Forum Updated to NodeBB v4.3 + New Features

Qt dimension

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.9k 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 19 Jul 2012, 14:10 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
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 19 Jul 2012, 15:09 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 19 Jul 2012, 15:24 last edited by
        #3

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

        1 Reply Last reply
        0
        • S Offline
          S Offline
          sierdzio
          Moderators
          wrote on 19 Jul 2012, 15:45 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 19 Jul 2012, 16:13 last edited by
            #5

            I will try it. Thank you

            1 Reply Last reply
            0

            1/5

            19 Jul 2012, 14:10

            • Login

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