durchsichtige fenster
Verfasst: 9. Februar 2008 21:02
hallo,
ich hab heute versucht mein fenster innen dursichtig zu machen, also dass man gerade den desktop dahinter sieht.
das ist mir so gelungen:
this->setAttribute(Qt::WA_NoSystemBackground); setAutoFillBackground ( 1 );
jetzt besteht leider das problem, dass beim ersten paint event (welches ja von dem aufruf von setattribute nur verzoegert wird) der inhalt vom fenster geloescht wird und dann schwarz erscheint.
wenn das fenster irgendwohin gezogen wird aktualisiert sich auch nicht der inhalt vom fenster und man sieht halt darin den orginalen desktopausschnitt.
wird im assistant auch beschrieben.
Qt::WA_NoSystemBackground:
Indicates that the widget has no background, i.e. when the widget receives paint events, the background is not automatically repainted. Note: Unlike WA_OpaquePaintEvent, newly exposed areas are never filled with the background (e.g after showing a window for the first time the user can see "through" it until the application processes the paint events). Setting this flag implicitly disables double buffering for the widget. This is set/cleared by the widget's author.
eigl haette ich gerne dass ebend der fensterhintergrund gerade das ist, was man hinter dem fenster sehen wuerde. hat jemand eine loesung?
setwindowopacity ist natuerlich toll, aber das laesst mich ebend kein nichttransparentes widget in das fenster setzen.
mfg qt fan
edit: setmask kenne ich auch schon, aber es trotzdem noch faelle welche nicht abdeckt sind.
ich hab heute versucht mein fenster innen dursichtig zu machen, also dass man gerade den desktop dahinter sieht.
das ist mir so gelungen:
this->setAttribute(Qt::WA_NoSystemBackground); setAutoFillBackground ( 1 );
jetzt besteht leider das problem, dass beim ersten paint event (welches ja von dem aufruf von setattribute nur verzoegert wird) der inhalt vom fenster geloescht wird und dann schwarz erscheint.
wenn das fenster irgendwohin gezogen wird aktualisiert sich auch nicht der inhalt vom fenster und man sieht halt darin den orginalen desktopausschnitt.
wird im assistant auch beschrieben.
Qt::WA_NoSystemBackground:
Indicates that the widget has no background, i.e. when the widget receives paint events, the background is not automatically repainted. Note: Unlike WA_OpaquePaintEvent, newly exposed areas are never filled with the background (e.g after showing a window for the first time the user can see "through" it until the application processes the paint events). Setting this flag implicitly disables double buffering for the widget. This is set/cleared by the widget's author.
eigl haette ich gerne dass ebend der fensterhintergrund gerade das ist, was man hinter dem fenster sehen wuerde. hat jemand eine loesung?
setwindowopacity ist natuerlich toll, aber das laesst mich ebend kein nichttransparentes widget in das fenster setzen.
mfg qt fan
edit: setmask kenne ich auch schon, aber es trotzdem noch faelle welche nicht abdeckt sind.