[Qt-qml] FolderListModel

aaron.kennedy at nokia.com aaron.kennedy at nokia.com
Tue Nov 23 01:06:30 CET 2010


Hi,

On 23/11/2010, at 9:31 AM, "Jones Martin (Nokia-MS-Qt/Brisbane)" <martin.jones at nokia.com<mailto:martin.jones at nokia.com>> wrote:
The ListView has no height so only one delegate is created.
Algorithmically I understand why this happens, but it does cause a lot of confusion.  What is the downside to having a 0 height (or width in the horizontal case) list create *no* elements?

Cheers,

Aaron

BR,
Martin.

From: qt-qml-bounces at trolltech.com<mailto:qt-qml-bounces at trolltech.com> [mailto:qt-qml-bounces at trolltech.com] On Behalf Of ext Thomas PABST
Sent: Tuesday, 23 November 2010 1:19 AM
To: <mailto:qt-qml at trolltech.com> qt-qml at trolltech.com<mailto:qt-qml at trolltech.com>
Subject: [Qt-qml] FolderListModel

Hi,

I'm currently developing a file manager with the new FolderListModel appeared on Qt 4.7.1.
import QtQuick 1.0
import Qt.labs.folderlistmodel 1.0

Rectangle {
width: 300;
height: 400;
 ListView {
     FolderListModel {
         id: foldermodel
         nameFilters: ["*"]
     }
     Component {
         id: filedelegate
         Text { text: fileName }
     }
     model: foldermodel
     delegate: filedelegate
 }
However, this example show us only one file. I'm looking for the better way to show all files.
How can we define the number of the file automatically. Can we do that only with Qml or we should use both qml/c++ ?
I'm thinking about the Repeater element, ListView element or grid element, but we must define the number of case each time !



-----------------------------------------------------
Thomas PABST
<mailto:thomas.pabst at gmail.com>thomas.pabst at gmail.com<mailto:thomas.pabst at gmail.com>
_______________________________________________
Qt-qml mailing list
Qt-qml at trolltech.com<mailto:Qt-qml at trolltech.com>
http://lists.trolltech.com/mailman/listinfo/qt-qml
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20101123/efd52f97/attachment.html 


More information about the Qt-qml mailing list