How to add a tag url pair directly in the code - AhmedKEpfl/qml-chilitags GitHub Wiki

Here I explain what we have to do if we want to bind a specific tag to a url address: If we wand the https://www.myUrl.com to be opened when we show the tag named tag_NB (NB is the number of the tag, it can be 0, 1, 2, ...) then we have to do the following:

  • In the main.qml file we have to create a new component like this: ChilitagsWebsite { id: tagID name: "tag_NB" webSiteUrl :"https://www.myUrl.com" messageToDisplay: "Going to www.myUrl.com" }

  • In the main.qml file, we have to go to the Chilitags object: Chilitags{ id: chilitags chiliobjects: [tagGoogleDocs, tagYoutube, tagGoogle] } and we have to add the id of the tag to the array chiliobjects (the tagID attribute of the ChilitagsWebsite object we just added).