Unsolved probleme with Flickable
-
Hello everybody,
I have a file named classif.qml with the code :
Item { id: classifView clip: true property alias content : item.children property alias contentHeight : item.height /* zone de défilement des paramètres */ Flickable { id: flickable flickableDirection: Flickable.VerticalFlick contentHeight: item.height anchors { fill: parent leftMargin: contentViewGI.flickableLeftMargin } Item { id: item anchors.fill: parent } ... }
and in my main.qml I have :
Classif{ //content : contentHeight : 2000 ... }
but It does not work.
Do you have an idea of the problem ?
thanks. -
Hi,
The file name must follow the casing of the class.
-
thanks for your answer.
I did not understand what you say. Can you give me an example please ? -
oh ok, no I just wrote wrong but the file is Classif.qml, the problem is always here
-
I think the problem is anchors.fill: parent inside Item. You're setting a circular dependency, because in child you say anchor to parent. them in parent you say contenHeight should be children height.
Try to use explicit values for height in Item, and only use anchors for horizontal width or for left/ right.