I know that for a QObject, there is a way to find all QObjects that are considered children - but I don't know if that means I would be able to find all widgets in the MainWindow. Plus, I don't want to find any non-widgets.
I ask because I'm trying to style a window translucent, and the background color is obviously not being applied to all widgets. Yet, I'm applying it to every widget I can think of. I don't want to change global opacity - text should remain opaque.
The pic below has the code for setting the translucency, as well as a picture of the window itself. As you can see, the text-edit area is colored. But I'm setting that, too (it's 'Ed'), so I don't know why it is!
You can use QObject::findChildren<QWidget*>()
to find all children widgets.