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. Text Qml overflow
Forum Update on Monday, May 27th 2025

Text Qml overflow

Scheduled Pinned Locked Moved QML and Qt Quick
7 Posts 3 Posters 6.3k 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.
  • M Offline
    M Offline
    Malek_Khlif
    wrote on 6 May 2015, 10:53 last edited by
    #1

    Hello everybody

    how can i make Text overflow hidden in Qml ?

    I Love Qt <3

    P T 2 Replies Last reply 6 May 2015, 10:57
    0
    • M Malek_Khlif
      6 May 2015, 10:53

      Hello everybody

      how can i make Text overflow hidden in Qml ?

      P Offline
      P Offline
      p3c0
      Moderators
      wrote on 6 May 2015, 10:57 last edited by
      #2

      @Malek_Khlif Do you mean text wrap ?

      157

      1 Reply Last reply
      1
      • M Malek_Khlif
        6 May 2015, 10:53

        Hello everybody

        how can i make Text overflow hidden in Qml ?

        T Offline
        T Offline
        tarod.net
        wrote on 6 May 2015, 12:04 last edited by tarod.net 5 Jun 2015, 12:05
        #3

        @Malek_Khlif For example, using this code, you'll see "very long" instead of the complete text.

        Text {
            id: text_field
            height: 40
            width: 40
            text: "very long text"
            color: "red"
            clip: true
        }
        

        You have to use the clip property.

        "Individually, we are one drop. Together, we are an ocean."

        P M 2 Replies Last reply 6 May 2015, 12:35
        1
        • T tarod.net
          6 May 2015, 12:04

          @Malek_Khlif For example, using this code, you'll see "very long" instead of the complete text.

          Text {
              id: text_field
              height: 40
              width: 40
              text: "very long text"
              color: "red"
              clip: true
          }
          

          You have to use the clip property.

          P Offline
          P Offline
          p3c0
          Moderators
          wrote on 6 May 2015, 12:35 last edited by
          #4

          @tarod.net clipping is not always a good idea. It should be avoided wherever possible. Here is some more info.
          Here elide can also be used instead.

          157

          T 1 Reply Last reply 6 May 2015, 12:39
          1
          • P p3c0
            6 May 2015, 12:35

            @tarod.net clipping is not always a good idea. It should be avoided wherever possible. Here is some more info.
            Here elide can also be used instead.

            T Offline
            T Offline
            tarod.net
            wrote on 6 May 2015, 12:39 last edited by
            #5

            @p3c0 Yeah, I know, but I think @Malek_Khlif is looking for something like clipping rather than eliding.

            Anyway, I agree with you.

            "Individually, we are one drop. Together, we are an ocean."

            1 Reply Last reply
            1
            • T tarod.net
              6 May 2015, 12:04

              @Malek_Khlif For example, using this code, you'll see "very long" instead of the complete text.

              Text {
                  id: text_field
                  height: 40
                  width: 40
                  text: "very long text"
                  color: "red"
                  clip: true
              }
              

              You have to use the clip property.

              M Offline
              M Offline
              Malek_Khlif
              wrote on 7 May 2015, 07:38 last edited by
              #6

              @tarod.net Thank you very much :))))) this is what i want

              I Love Qt <3

              T 1 Reply Last reply 7 May 2015, 08:04
              0
              • M Malek_Khlif
                7 May 2015, 07:38

                @tarod.net Thank you very much :))))) this is what i want

                T Offline
                T Offline
                tarod.net
                wrote on 7 May 2015, 08:04 last edited by tarod.net 5 Jul 2015, 08:05
                #7

                @Malek_Khlif Wonderful! You're welcome! :)

                Oh, by the way, please mark the post as solved.

                "Individually, we are one drop. Together, we are an ocean."

                1 Reply Last reply
                0

                4/7

                6 May 2015, 12:35

                • Login

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