Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Can’t use maximumLineCount

    QML and Qt Quick
    4
    10
    3251
    Loading More Posts
    • 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
      MAMartins last edited by

      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 Reply Quote 0
      • ?
        Guest last edited by

        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 Reply Quote 0
        • M
          MAMartins last edited by

          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 Reply Quote 0
          • M
            MAMartins last edited by

            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 Reply Quote 0
            • B
              blam last edited by

              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 Reply Quote 0
              • M
                MAMartins last edited by

                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 Reply Quote 0
                • M
                  mlong last edited by

                  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 Reply Quote 0
                  • M
                    MAMartins last edited by

                    documentation needs improvement

                    1 Reply Last reply Reply Quote 0
                    • B
                      blam last edited by

                      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 Reply Quote 0
                      • G
                        Go0gle last edited by

                        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 Reply Quote 0
                        • First post
                          Last post