Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Get the drop event inside child widgets in a MainWindow.
Huy Manh last edited by
Hello Qt Devs, I have been using Qt for 3 months but still don't sure about event handlers.
I have a MainWindow with 10 list widgets for dropping inside and a LineEdit for counting the items inside these widgets. What I want to do is whenever an item is dropped inside the widgets, lineedit count plus 1. Can someone suggest for me a method, I tried dropEvent and eventFilter but didn't work. Thank you for reading.
Hi and welcome to devnet,
What exactly did you implement ?
One simple way is to create a subclass and re-implement the dropEvent method and emit a signal from there. Then you connect that signal in the main window to increment your counter.