Here are the files.
Here are the files.
It looks like the port is not working properly. If you look at the attached pictures, you will see the difference. The main issue is the background color. Notice that the QT3 version paints the entire ListView object purple. The QT4 version does not paint the entire background. I've tried many things, and it looks like it is painted when a QPuListViewItem or QpuWidgetItem is added to the QPUListView object. The QT3 version will paint the Listview objects when there are no items.
Does anyone have a suggestion on how to fix this?
Thanks,
Glenn
Did you try setting the QPalette::Base brush?
I added this line to the function that creates the QPUListView object.
taskView -> Q3ListView::setBackgroundRole(QPalette::Base) ;
This will make the background white. If I set it to Dark or Window, it is still white when there are no QPUListViewItem or QPUListViewWidgets inserted into the QPUListView object. If I insert a QPUListViewItem it will make the background under the QPUListViewItem object dark or light grey. The rest of it is still white. I'm trying to make the entire back ground the color of the Window.
I don't know if I understand the problem, but the solution I mentioned seems to work fine for me...
QPalette::Base of the list view is set to light yellow and QPalette::Window of the parent widget is set to light green (just to distinguish the background).
What did you compile this on? I'm using Linux and GCC. Could you the code of you example? Thanks.
Linux + GCC There is no code, I mocked it in Designer. This is a QListView (or QListWidget, I don't remember) that has QPalette::Base colour component changed to light yellow inside a QWidget that has its QPalette::Window colour component changed to light green.
An equivalent code is more/less:
Qt Code:
l->addWidget(lv); lv->setPalette(p); p = wgt->palette(); wgt->setPalette(p);To copy to clipboard, switch view to plain text mode
Just a quick screenshot of what I implemented today
Wysota,
That works great. I added it to the QPUListView constructor. Thanks.
The example you show in the last post, was the made with QT 4's QListView?
Glenn
No, this is a completely custom widget derived from QScrollArea. You can add separate "tasks" to it and assign any widget you want as the "body" of the task. You can even fill the widget with tasks in Designer. Of course the whole thing is stylable, so you can make it look just like the WinXP original.
Last edited by wysota; 20th March 2007 at 09:49. Reason: Added some content
gsQT4,
do you have some working version of QpuListView in only Qt4 ?
Or if you have with this some issues, maybe i can help you.
Bookmarks