Keep a singleton ComputerManager outside of the Models
This commit is contained in:
parent
0d26ef7e5c
commit
1b1ad86271
9 changed files with 72 additions and 24 deletions
|
|
@ -3,6 +3,8 @@ import QtQuick.Controls 2.2
|
|||
|
||||
import AppModel 1.0
|
||||
|
||||
import ComputerManager 1.0
|
||||
|
||||
GridView {
|
||||
property int computerIndex
|
||||
|
||||
|
|
@ -16,8 +18,8 @@ GridView {
|
|||
|
||||
function createModel()
|
||||
{
|
||||
var model = Qt.createQmlObject('import AppModel 1.0; AppModel {}', parent, "")
|
||||
model.initialize(computerIndex)
|
||||
var model = Qt.createQmlObject('import AppModel 1.0; AppModel {}', parent, '')
|
||||
model.initialize(ComputerManager, computerIndex)
|
||||
return model
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue