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. TextArea.flickable: TextArea {} - non-existent attached object
Qt 6.11 is out! See what's new in the release blog

TextArea.flickable: TextArea {} - non-existent attached object

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 509 Views 2 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.
  • M Offline
    M Offline
    magicDM
    wrote on last edited by magicDM
    #1

    In application for some reason doesn't work attached property TextArea.flickable: TextArea { text: "someText"; }. Example, that simulate problem:

    import QtQuick 2.11
    import QtQuick.Controls 2.2
    import QtQuick.Window 2.12
    
    Window {
        id: appWindow
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
    
        Rectangle {
            property var title: "Example"
            border {
                color: "red"
            }
    
            width: 420
            height: 160
    
            Flickable {
                anchors.fill: parent
                TextArea.flickable: TextArea { // here error non-existent attached object
                    text: "Non-existent attached object"
                }
            }
        }
    }
    
    

    There is no error in the example, but in my case an error occurs. Tell me what need to check to fix the error?

    Note: this code work fine in my case:

    Flickable {
                anchors.fill: parent
                TextArea {
                    text: "Non-existent attached object"
                }
            }
    
    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      This property was added in Qt 5.7, so you need a different import statement:

      import QtQuick.Controls 2.7
      

      Or, since you are using Qt 5.11:

      import QtQuick.Controls 2.11
      

      (Z(:^

      M 1 Reply Last reply
      1
      • sierdzioS sierdzio

        This property was added in Qt 5.7, so you need a different import statement:

        import QtQuick.Controls 2.7
        

        Or, since you are using Qt 5.11:

        import QtQuick.Controls 2.11
        
        M Offline
        M Offline
        magicDM
        wrote on last edited by magicDM
        #3

        @sierdzio said in TextArea.flickable: TextArea {} - non-existent attached object:

        ick.Controls 2.7

        https://doc.qt.io/qt-5/qtquickcontrols-index.html#versions, these versions doesn't exist

        import QtQuick.Controls 2.7 // doesn't exist
        
        import QtQuick.Controls 2.11 // doesn't exist
        

        import QtQuick.Controls 2.4 - are also didn't help

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

          I don't know, perhaps you have found a bug.

          The code looks correct (although that attached property and the way it is supposed to be used is an abomination).

          (Z(:^

          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