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. Can’t use maximumLineCount

Can’t use maximumLineCount

Scheduled Pinned Locked Moved QML and Qt Quick
10 Posts 4 Posters 3.7k 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
    MAMartins
    wrote on last edited by
    #1

    Hi!

    I'm using Qt Creator 2.0.94 (2.1.0-rc1) and I would like to take advantage of the property "maximumLineCount: 1" but it says that that is not a property.

    I use import Qt 4.7
    I cannot use import QtQuick 1.0 or 1.1 it says that it is not installed.

    I think that the documentation of Qt is a little bit messy because, for eg, use examples that can't be used on the program

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on last edited by
      #2

      can you elaborate where you came across this property and where you are trying to use it

      if you have Qt SDK installed properly you should get Qt Quick without issues.
      Try to download the latest verion that was released a couple of days ago and let me know

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

        the property is this:
        http://doc.qt.nokia.com/4.7-snapshot/qml-text.html#maximumLineCount-prop

        i would like to use it here:
        @Text {
        id: categoryText
        width: parent.width
        height: parent.height / 2
        anchors.verticalCenter: category.verticalCenter
        font.pointSize: 15
        font.family: "Helvetica"
        font.bold: true
        horizontalAlignment: "AlignHCenter"
        color: "white"
        wrapMode: "WrapAnywhere"
        maximumLineCount: 1

                text: "Ecónomia"
            }@
        

        the qt ide don't have an auto-update? should I uninstall the actual version or just install it on top of the actual?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MAMartins
          wrote on last edited by
          #4

          just installed the latest beta 1.1 for osx and still can't use maximumLineCount: 1 and I can't import qtquick 1.1 only 1.0

          this installation should have qtquick 1.1...

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

            The Qt SDK has Qt 4.7.2, which includes QtQuick 1.0, not QtQuick 1.1.

            QtQuick 1.1 is scheduled for a later Qt release. If you want to use it now, you'll need to grab the Qt 4.7 source code from the repository at http://qt.gitorious.org/qt .

            The documentation under http://doc.qt.nokia.com/4.7-snapshot shows the latest documentation in the 4.7 branch, which may include features that have not yet been released.

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

              my sdk has Qt 4.7.1, at least according to the information in the about, and i've downloaded the latest beta:

              Qt Creator 2.1.0
              Based on Qt 4.7.1 (64 bit)

              Built on Feb 16 2011 at 07:33:41

              From revision 72201a845e

              Copyright 2008-2011 Nokia Corporation. All rights reserved.

              The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mlong
                wrote on last edited by
                #7

                It's interesting, though, that the docs I'm seeing (the 4.7-snapshot online docs) say that the maximumLineCount property is read-only, yet the description starts by saying "Set this property to limit the number of lines that the text item will show."

                Software Engineer
                My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  MAMartins
                  wrote on last edited by
                  #8

                  documentation needs improvement

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    blam
                    wrote on last edited by
                    #9

                    The property is not read-only, so it looks like a bug in the documentation. This has been reported as http://bugreports.qt.nokia.com/browse/QTBUG-17972.

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      Go0gle
                      wrote on last edited by
                      #10

                      I've used it on Qt Quick 2.0.
                      I think the only bag is this line: "Was introduced in QtQuick 1.1."

                      @Text
                      {
                      anchors.centerIn: parent
                      width: 200
                      font.pixelSize: 24
                      maximumLineCount:2
                      wrapMode: Text.WordWrap

                          text: "This course will discuss the major ideas used today"
                      }@
                      

                      "Screen":http://www.freeimagehosting.net/5c54o

                      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