Home > Mobile >  Transparency of the window createWindowContainer function will be removed?
Transparency of the window createWindowContainer function will be removed?

Time:09-20

Dear bosses, I built a interface, using the setAttribute (Qt: : WA_TranslucentBackground, true); To achieve transparent Windows, use another program to embed this window, the following code

QWindow * pWindow;
PWindow=QWindow: : fromWinId (static_cast & lt; WId> (wid));
PWindow - & gt; SetFlags (Qt: : FramelessWindowHint);

QWidget * pWidget;
PWidget=QWidget: : createWindowContainer (pWindow);
PWidget - & gt; SetParent (this);

Results after the form embedded, unable to show, but the process is to pull up,,,,, don't know what is the reason, consult ~

CodePudding user response:

Make sure do not add WA_TranslucentBackground is not normal,

CodePudding user response:

Use the layout to embed the control, the UI - & gt; VerticalLayout - & gt; AddWidget (SufaceWidget); Like this,

CodePudding user response:

The landlord to solve this problem, this problem can be transparent on some computers, some not,
  •  Tags:  
  • Qt
  • Related