Event on start of method and catch with eventfilter immediately
it is possible send event on the start of method, catch event and then continue code in method.
I need create this system:
- start method where I will change image
- on start of this method send event - image will be changed
- then continue with code of changing image
- on the end of method send event that image changed
I create library with image filters and I need sending events to main app where eventfilter catch events from library and modify GUI.
Thank you Ladislav
Hi and welcome to devnet,
Are you sure you want an event or is it a signal ?
I don't know what is better approach for my purpoise. Currently I am using events at the end of method. And in main app class I have installed eventfilter to qApp.
- Before I start working on image, send information "Now I will changing image - show progress - backup current image variable"
- Start changing image and at the end of algorithm send info "Image finished"
Currently at the end of algorithm I am sending event "Image finished". So I wondered about create event in synchronize thread on the start of algorithm, but I don't know if this solve my problem.
Requirement is write minimum code in main app. Every thing else I am coding as library and than link to main app.
Thank you for advice
Then it sounds that you should use signals and slots rather than events, like e.g. in Qt's Model/View implementation. For column insertion there's a signal emitted as well as once the column has been inserted.