Answer the question
In order to leave comments, you need to log in
How can I hide a top-level widget in Qt, but still show a nested (lower-level) widget?
As a training example (according to the tutorial), I made up the widget shown in the picture:
How to make it so that when this widget is displayed, only the data entry form with rounded edges is shown?
Answer the question
In order to leave comments, you need to log in
From the looks of it, it wouldn't hurt to add a layout to stretch your child widget inside the parent widget.
In the constructor of the parent widget, you can add:
setAttribute(Qt::WA_TranslucentBackground);
Should help.
xseven, thanks for the advice =) The widget is already stretched with the layout inside the parent one, just a large margin is set. In order for everything to work perfectly, you need to add the following in addition to your line:
setAttribute(Qt::WA_TranslucentBackground);
setWindowFlags(Qt::FramelessWindowHint);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question