• 8771阅读
  • 1回复

【提问】QPE 2.2: How to implement a ListBox with background image [复制链接]

上一主题 下一主题
离线andyyeh75
 

只看楼主 倒序阅读 楼主  发表于: 2006-03-08
【提问】QPE 2.2: How to implement a ListBox with background image
Hello,

My environment is QPE 2.2. And it's a hurry issue.
In an individual APP, I have to create a Listbox with a background image on its items' back.
I have tried to do it by using QPallete, and setting its QColorgroup::Base as a Pixmap.

Although it seems look right at first, it still not what I need.
By this way, the background will be painted overlap when moving the highlight bar exceeding the screen range.

I need a listbox with background image that the background shows always normal.

Thanks in advance.

Below image shows my requirement. A List with background image.
andyyeh has attached this image (reduced version):
离线XChinux

只看该作者 1楼 发表于: 2006-03-10
Re:【提问】QPE 2.2: How to implement a ListBox wi
不知道下面的对你有没有帮助:

autoFillBackground : bool
This property holds whether the widget background is filled automatically.
If enabled, this will cause Qt to fill the background using the widget's background role before invoking the paint event.
In addition, Windows are always filled with QPalette::Window, unless the WA_OpaquePaintEvent or WA_NoSystemBackground attributes are set.
This property was introduced in Qt 4.1.
二笔 openSUSE Vim N9 BB10 XChinux@163.com 网易博客 腾讯微博
承接C++/Qt、Qt UI界面、PHP及预算报销系统开发业务
快速回复
限100 字节
 
上一个 下一个