------ Solution ---------------------------------------- ----
QPalette pal = palette();
pal.setColor(QPalette::Background, QColor(0x00,0xff,0x00,0x00));
setPalette(pal);
opaque form transparent controls , written in the form constructor , I very much like a piece of code , commonly
------ Solution -------------- ------------------------------
QColor (0x00, 0xff, 0x00, 0x00));
The last parameter is transparent , you can set up their own
------ Solution --------------------------- -----------------
how I did not find that Qt :: WA_TranslucentBackground have this defect ?
------ Solution -------------------------------------- ------
QPalette pal = palette ();
pal.setColor (QPalette :: Background, QColor (0x00, 0xff, 0x00, 0x00));
setPalette (pal);
I tested it under how it is all black
------ eference ---------------------- -----------------
did not care ah
------ eference ---------------- -----------------------
next test , the window becomes white , and can not see anything .
------ eference --------------------------------------- < br> QPalette tried many times still not resolved , you do not know there is no good way .
------ eference --------------------------------------- < br> QPalette can not seem to solve my problem , I still retained the WA_TranslucentBackground attributes , but with some crappy method avoids the side effects . First knot tie bar, free facie qt source talk to exchange .
------ eference --------------------------------------- < br> the landlord will not happen? Hope gets advice , I use directdraw display video, widget by passing the handle , and then show up, but when I set setWindowFlags (Qt :: FramelessWindowHint | Qt :: WindowMinimizeButtonHint)
and setAttribute (Qt :: WA_TranslucentBackground) , the video can not be displayed , seeking landlord crappy way ~ ~ ~
------ eference ------------ ---------------------------
same crappy seeking ways
------ eference ------ ---------------------------------
early to see your post I would not be depressed a morning
没有评论:
发表评论