i made custom widget with two labels inside. First one is for showing chosen color and second one is just for displaing text. I want to make hover effect. I tried different approaches but all of them ends with the same result. Hover works but only for those two block seperately (like in the pictures below:)
I want to highlight whole block as one (the red rectangle area showed below):
I tried to achieve that inside of custom widget constructor with:
this->setStyleSheet(":hover{ background-color: rgba(0,20,100,0.5); }");
Also i tried to add QFrame object to my ui and replace that with my custom widget. Both methods are not working. I found that topic: Set a StyleSheet for a whole widget in Qt
where someone managed to make it with:
Finally I solved the problem creating a QFrame inside the main QWidget and setting the StyleSheet of that QFrame.
I tried that approach but i'm not sure if i applied that correctly (propably not since that's still not working). Can someone help me with that?