While I would still like to find a proper solution, here is ugly workaround
which allows to get rid of scrollbars and return scrolling-by-dragging
behaviour to TableView on Windows Phone:

TableViewStyle {
Component.onCompleted: {

            if(Qt.platform.os == 'winphone')
            {
                var traverse = function(item, level, filter) {
                    for(var i = 0; i < item.children.length; ++i) {
                        if(filter && filter(level, item.children[i])) {
                            return item.children[i];
                        }

                        traverse(item.children[i], level + 1, filter)
                    }
                }

                traverse(control, 0, function(level, item) {
                    console.log(new Array(level * 4).join(' ') + item);

                    if(item.toString().indexOf('QQuickMouseArea') != -1)
                    {
                        if(item.parent.toString().indexOf('QQuickListView')
!= -1)
                        {
                            console.log('item.preventStealing: ',
item.preventStealing)
                            item.preventStealing = false
                            console.log('item.parent.interactive: ',
item.parent.interactive)
                            item.parent.interactive = true
                        }

                        return true;
                    }

                    return false;
                })

                control.horizontalScrollBarPolicy = Qt.ScrollBarAlwaysOff;
                control.verticalScrollBarPolicy =  Qt.ScrollBarAlwaysOff;
            }
        }
}

2015-01-03 13:25 GMT+03:00 Alexander Ivash <elder...@gmail.com>:

> Is it possible to apply different style (for example android's) to
> TableView ? Not sure why, but on Windows Phone it looks like on desktop
> platforms: has desktop-like scrollbars and scrolling is possible only via
> scrollbars. What I need - is behaviour like on android platform: no
> scrollbars visible and scrolling is possible just by dragging.
>
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to