"Open with" in Qt5 application

Yes, ideally this would rather be opt-in, but I suspect it was a somewhat late addition to the API, and doing it that way would have excluded perfectly working apps from the “Open With” list, or something.

Not necessarily, for example DiskProbe can open any file and does not care about MIME types.

Handling command line arguments does not imply in any way that it is save or even going to work at all to pass a file path through argv[1].