• 8461阅读
  • 6回复

如何设置QComboBox的下拉列表为半透明效果 [复制链接]

上一主题 下一主题
离线swuster_225
 
只看楼主 倒序阅读 楼主  发表于: 2008-08-14
— 本帖被 XChinux 执行加亮操作(2008-08-14) —
各位大虾:
        有没有人了解如何设置QComboBox的下拉列表为半透明效果?麻烦指点一下,谢谢。qt版本4.4。0
[ 此贴被swuster_225在2008-08-14 11:04重新编辑 ]
I Believe I can Fly to the Sky .
离线water_wf

只看该作者 1楼 发表于: 2008-08-14
做个透明的palette
通过setPalette.不知道行不行
离线swuster_225
只看该作者 2楼 发表于: 2008-08-14
我试过,不行
I Believe I can Fly to the Sky .
离线water_wf

只看该作者 3楼 发表于: 2008-08-14
windowOpacity : double

This property holds the level of opacity for the window.

The valid range of opacity is from 1.0 (completely opaque) to 0.0 (completely transparent).

By default the value of this property is 1.0.

This feature is available on Embedded Linux, Mac OS X, X11 platforms that support the Composite extension, and Windows 2000 and later.

This feature is not available on Windows CE.

Note that under X11 you need to have a composite manager running, and the X11 specific _NET_WM_WINDOW_OPACITY atom needs to be supported by the window manager you are using.
离线swuster_225
只看该作者 4楼 发表于: 2008-08-15
这个还是不行的
QComboBox的popup有两部分组成,一部分是一个QListView后面还有个QComboBoxPrivateContainer‘组成的
I Believe I can Fly to the Sky .
离线swuster_225
只看该作者 5楼 发表于: 2008-08-15
已经解决一部分,通过VIEW()->PARENTWIDGET()->SETWINDOWOPACITY(0.5)在WINDOWS上解决了透明问题,但是现在无法通过setStyleSheet实现透明效果
I Believe I can Fly to the Sky .
离线hehui

只看该作者 6楼 发表于: 2008-09-04
设置父窗口透明度应该可以吧!
快速回复
限100 字节
 
上一个 下一个