Hi and welcome to devnet,
First thing, please don't delete all that stuff in your destructors. Qt has a pattern that is based on parent widget (the parameter "this" in widget constructors) that take care of destructing all the children automatically when the parent is deleted: http://doc.qt.io/qt-5/objecttrees.html
Now regarding your problem, only one widget can have focus at the same time. For the focus part, you can use setFocusPolicy on your widgets, giving an enum that tells more about the behavior you expect.
For what I have experienced, playing with opacity and trying to give a modern look to a desktop software is kind of a pain. Long story short: there is no user friendly API to do so, or at least as user friendly as what QML provides. This is either because the widgets part is late compared to the QML one, or because "modern" has been associated with app, browsers, Internet, but not with desktop. Nonetheless, things might evolve in the future, since Qt developers have communicated about resuming the widgets development. This doesn't solve your problem, but could explain why you are having so much trouble trying to code an overlay that behaves with good focus policy, and using low level code such as QPalette that is always a sign you're doing something wrong, or at least not initially intended. Which could be fine, if you really know what you're doing, and you are aware that you'll have to deal with a lot of work to make your application look the same on every platform.
So I created a project with your code and here are some remarks:
1 Do not set a layout to your main window, just set the central widget with, well
2 qreal is an alias for double, so instead of qreal(100)/100 just write 1.0; same for qreal(50)/100, just write 0.5 and it will be perfectly fine.
3 No need to use "this->" you are coding in C++, not JAVA ;)
For your problem, I think I don't really get what you are expecting. Just an overlay when the setting widget pops? If so, maybe working with a QDialog (a modal one) would be better.