PDA

View Full Version : QListWidget MACOS X



Zalwou06
28th August 2012, 10:29
Hi all

I am developing an application that works on windows and on mac.
I have a very big problem with QListWidget lists on mac.
I didn't find helpful topics on the web talking about this problem so it's why I created this new thread.

I use QListWidget many times in my application because I need to display custom items having a lot of controls (buttons, checkbox, labels, pictures, etc..) on it, then I can't use QListView lists with model/delegates.

I use the setItemWidget method of QListWidget to add a QListWidgetItem and a QWidget for each items of the list.

QListWidget* pList; // the created list
QWidget* pWidget; // the created widget
QListWidgetItem* pItem = new QListWidgetItem(pList);
pList->setItemWidget(pItem, pWidget);

This is working on windows but NOT on mac.

I have a bad issue concerning scroll of my items.
As I can see the list actually scroll because I can see that the items are scrolling but not the widgets.
The widgets stay at the same place, they not scroll.

Does anybody have the same issue ?

thank in advance for your help.
Zal

spirit
28th August 2012, 10:48
What's your version of Qt? Do you have simple demo app which reproduces the issue, we could check it on mac?

Zalwou06
28th August 2012, 11:05
Hi,

I use Qt 4.8.0 and no sorry I don't have a simple demo app since this is a part of a huge professional application involving visual studio 2008. Then I use the QT plugin for visual studio instead of using with QT regular application system and building process.

spirit
28th August 2012, 11:08
Okay, then: did you try to build your app using Qt 4.8.1/Qt 4.8.2, because these version have some MacOS-specific fixes?

Zalwou06
28th August 2012, 11:41
I think the Qt 4.8.2 is not released I can't find it on the website. Am I wrong ?

spirit
28th August 2012, 11:43
It is (http://qt.nokia.com/downloads/downloads#qt-lib), but it's not part of the latest SDK.

Zalwou06
28th August 2012, 12:54
By the way I am testing it with Qt 4.8.1 on a regular Qt project on mac and I have the same issue.

I will provide you the project soon.

Added after 1 9 minutes:

Well the list does not work on Qt4.8.1 and Qt4.8.0 but works on Qt4.7.4
Very strange

here is the project in a zip file

http://www38.zippyshare.com/v/34512572/file.html

spirit
28th August 2012, 13:16
Doesn't work for me too. Qt 4.8.1, MacOS 10.8.
It looks like regression or not completely ported Qt for using it under Mountain Lion.
You should send a bug report if this bug appears in Qt 4.8.2.

Zalwou06
28th August 2012, 14:09
Thanks
I am testing it on Lion with the same issue. I will have a look at the differences between 4.7.4 and 4.8 to see if I can fix it by myself because we are about to release the app and I can't wait for a bugfix.

10.6 has the same issue too

Added after 35 minutes:

waouw impossible :)

I've submitted a bug https://bugreports.qt-project.org/browse/QTBUG-27043