|
你把鼠标定位到setAttribute中,按F1查看帮助,可以看到Qt::WA_NoSystemBackground,Qt::WA_OpaquePaintEvent, true等枚举变量的含义。
你也可以在Qt Assistant中搜索。
我查了一下,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). This flag is set or cleared by the widget's author.
WA_OpaquePaintEvent英文解释是Indicates that the widget paints all its pixels when it receives a paint event. Thus, it is not required for operations like updating, resizing, scrolling and focus changes to erase the widget before generating paint events. The use of WA_OpaquePaintEvent provides a small optimization by helping to reduce flicker on systems that do not support double buffering and avoiding computational cycles necessary to erase the background prior to painting. Note: Unlike WA_NoSystemBackground, WA_OpaquePaintEvent makes an effort to avoid transparent window backgrounds. This flag is set or cleared by the widget's author.
后面的我也不是很明白,不过你可以自己查下Qt Assistant。 |
|