the approach is correct. if you need help with that, you can’t keep the code a secret.
I would recommend discussing that on a Qt-specific forum. cv::imwrite()
does not touch any Qt GUI.
Yes, I believe it’s an issue with your code and how you use Qt.