Unsolved TextArea.flickable: TextArea {} - non-existent attached object
-
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" } }
-
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
-
@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
-
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).