I am using qt, and my navigation item need to set custom image from the device, How to set Image on NavigationItem?
App {
Navigation {
NavigationItem {
title: "Main"
//I need set Image on this item, kindly help me. I know there is icon, but I dont know how to set custom image.
//Image{ " icon.source: "https://www.howtogeek.com/wp-content/uploads/2018/06/shutterstock_1006988770.png""
// anchors.left:parent.left
}
}
}
If I understood you correctly -- you want to set navigation item image to be something more than one of the
IconTypeconstants. To make it possible you need to declare your own component and set asiconComponent. Also, keep in mind that you are not limited to use only images there -- you can use any kind of UI element (for reference, see example in official documentation).Here is an example implementation you can try yourself: