Skip to content

Instantly share code, notes, and snippets.

@Kakadu
Last active August 29, 2015 13:56
Show Gist options
  • Save Kakadu/8935147 to your computer and use it in GitHub Desktop.
Save Kakadu/8935147 to your computer and use it in GitHub Desktop.
The 2nd variant is 100% correct implementation. But it introduces dummy identifier which creation I want ot avoid. 1st peice of code is about avoiding it. I dont introduce variable there, I set property value to VisualListItem explicitly. It seems to work correctly but QtCreator's syntax highlighter doesn't understand it as expected. Am I missin…
Item {
property variant forestQuest1: _forestQuest1
Rectangle {
id: _forestQuest1
property variant choices: VisualItemModel {
id: _forest1_choices
QuestButton { ... }
QuestButton { ... }
}
function isAvailable() { ... }
}
}
Item {
property variant forestQuest1: _forestQuest1
Rectangle {
id: _forestQuest1
property variant choices: _dummyid
VisualItemModel {
id: _dummyid
QuestButton { ... }
QuestButton { ... }
}
function isAvailable() { ... }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment