Hello QML-ers

This is a somewhat complicated example. So I apologize in advance. I am writing 
this to get some guidance. I have a row of loaders which loads a rectangle. 
Like this:

Flickable{

 ListModel {
    id: aModel
}
..
        Row{            
             
            Repeater {
                    model:aModel
                    Loader { //loads a qml rectangle from "aModel"


I have set a mouse area on the loaded rectangle like this:

Rectangle {
 id: rect
 
 MouseArea {
             anchors.fill: parent
             drag.target: rect
             ...
             ...
         }
}

First off, I have to ask if this is the intended way of making an item 
draggable when it is interface by a Loader. The reason I ask is because the 
Loader creates an invisible item that contains the rect. This means that 
instead of 

 drag.target:rect

I have to write 
 drag.target:rect.parent

I have to do this because combining a drag with a move of items in the model of 
 "aModel" makes very strange things happen. Am I doing things right?

Thanks,
Bartosh






                                          
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-qml

Reply via email to