import QtQuick 2.11 import QtQuick.Window 2.11 import QtQuick.Layouts 1.11 import QtQuick.Controls 2.4 import Qt.labs.folderlistmodel 2.11 Item { RowLayout { anchors.fill: parent //anchors.topMargin: 15 spacing: 0 Rectangle { Layout.preferredWidth: parent.width * 0.3 Layout.fillHeight: true ListView { id: files anchors.fill: parent FolderListModel { id: folderModel folder: "file:" + basePath + "shots/" nameFilters: ["*.jpg"] } model: folderModel delegate: ItemDelegate { width: parent.width text: model.fileName font.pixelSize: 15 contentItem: Text { text: parent.text font: parent.font elide: Text.ElideRight horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter wrapMode: Text.Wrap } highlighted: ListView.isCurrentItem onClicked: { files.currentIndex = model.index; } } } } Rectangle { Layout.fillWidth: true Layout.fillHeight: true color: "lightgray" Image { id: currentPhoto anchors.fill: parent anchors.margins: 20 source: folderModel.get(files.currentIndex, "fileURL"); fillMode: Image.PreserveAspectFit autoTransform: true } } } }