Here are a couple of suggested improvements to #6421.
Feel free to cherry-pick back into that pull if you want to maintain it. Or if you’d like this pull to take over, that’s fine too..
I built them on a rebased #6421 and I lost a few comment changes that differed between that pull’s NO_QT_KEYWORDS commit and the one in master.