Modal loop issues inside Button "clicked"
I'm using Qt quick controls to adapt an existing application. In a Button handler, I call a C++ function that enters a modal loop (tryed both a while(true) QApplication::processMessage or a new QEventLoop ).
Once entered the loop, the button start misbehaving, i.e. everytime I click in any point of the screen (possibly another mouseArea), the click is still captured by the button (which may also be inactive) and more and more clicked events get generated improperly. It seems that the button keeps the mouse captured until you exit the clicked handler.
Any hint about this? Should I file a bug?
I know that probably modal loops are not a good practice, but I need to adapt an existing application and fake some modal interfaces using qt quick (messageboxes, small dialogs,etc...) and I don't want to change all the application flow.