Hi there I am trying to have my 3 customWidget shown to my list view but yet I have not found any solution.
I want By default when my dialog with list view is shown it should show all items having CustomWidget1 when mouse is hovered on any of those item it should show customWidget2 and when mouse hover is out it should come back showing customWidget1. and the third one is when item is doubleClick it should show customWidget3.
I tried doing this using itemdelegate createEditor() but dont know how to get mouse hover in my listview, I connected entered() signal but once item is set to my customWidget I am not getting entered() event at all.
Than, you simply cannot use widgets. You will have to use real delegates to do your rendering from scratch directly from the delegate. I don’t know what you have in your widget, but if there are other widgets in there (buttons, checkboxes, or worse: even more complicated widgets), you have a real problem. You won’t be able to replicate those properly on your own in a delegate.
Or, alternatively, you might want to look into using QML (1) for this. In QML, it is easier to create items that behave dynamically (change appearance and / or size on hover, have buttons, etc) than it is in the widget world, but that has limitations of its own.
You are going to have a very hard time to get a delegate to work for such interactive widgets. Item views and using widgets for items just don’t mix well. Creating 3000+ of your custom widgets x3 per state is never going to perform well. Note that you can use QML for only this item view. The rest of your application could still be widget based.