Quote Originally Posted by JaySDC View Post
Even tough I understand what you say and the philosophy behind it, my coding knowledge is too limited to create the code. My skill can only try and customize an existing code based on examples.
Right, that's one of the reasons I suggested the simpler approach.

Creating a custom component in QML is very easy.
Basically you just copy part of the code you have to a new QML file for which you use a filename that matches the name of how you want to call your component in the QML file using it.

E.g. your code conceptually looks like this

Qt Code:
  1. import QtQuick 2.4
  2.  
  3. Item {
  4. ListModel {
  5. }
  6.  
  7. PathView {
  8. ....
  9. }
  10. }
To copy to clipboard, switch view to plain text mode 
You then copy all code of that PathView section to a new file along side the original file, e.g. GameListView.qml
Qt Code:
  1. import QtQuick 2.4
  2.  
  3. PathView {
  4. ....
  5. }
To copy to clipboard, switch view to plain text mode 
The original file can then be changed to
Qt Code:
  1. import QtQuick 2.4
  2.  
  3. Item {
  4. ListModel {
  5. }
  6.  
  7. GameListView {
  8. }
  9. }
To copy to clipboard, switch view to plain text mode 
That does not work at this point because you have been referencing the list model inside the PathView.
But in fact you only needed the directory. so you add a property for that in GameListView.qml
Qt Code:
  1. PathView {
  2. property string directory
  3.  
  4. ....
  5.  
  6. FolderListModel {
  7. id: gameListModel
  8. nameFilters: ["*.png"]
  9. folder: parent.directory
  10. }
  11. }
To copy to clipboard, switch view to plain text mode 
You can then use multiple GameListView instances
Qt Code:
  1. Item {
  2. property int currentSubType: 0
  3.  
  4. GameListView {
  5. visible: parent.currentSubType === 0
  6. directory: subTypeModel.get(0).path;
  7. }
  8. GameListView {
  9. visible: parent.currentSubType === 1
  10. directory: subTypeModel.get(1).path;
  11. }
  12. }
To copy to clipboard, switch view to plain text mode 

Cheers,
_