Hello,
I have a QListWidget with some buttons inside it (added using setItemWidget()). When I add enough items automatic vertical scrollbar appears. However, the scrollbar does not work (I'm able to move outside borders and it does not follow). Here is a code example:
If you remove the setItemWidget() calls scrolling works once again. Also on E51 (E71 works fine), if you leave just one button (e.g. index 1), scrolling works as long as you don't move on the last item (index 6). If you do, then pressing the "up" key sets focus directly on the button and not on the item above the selected one (index 5). Anyone else faced similar problems and/or can provide some info how to fix them?Code:#include <QtGui> int main(int argc, char *argv[]) { QApplication app(argc, argv); QWidget main; QListWidget *list = new QListWidget(); list->setFixedHeight(100); new QListWidgetItem("a", list); new QListWidgetItem("b", list); new QListWidgetItem("c", list); new QListWidgetItem("d", list); new QListWidgetItem("e", list); new QListWidgetItem("f", list); new QListWidgetItem("g", list); list->setItemWidget(list->item(0), new QPushButton("click")); list->setItemWidget(list->item(1), new QPushButton("click")); list->setItemWidget(list->item(2), new QPushButton("click")); list->setItemWidget(list->item(3), new QPushButton("click")); list->setItemWidget(list->item(4), new QPushButton("click")); list->setItemWidget(list->item(5), new QPushButton("click")); list->setItemWidget(list->item(6), new QPushButton("click")); QVBoxLayout layout; layout.addWidget(list); main.setLayout(&layout); main.showMaximized(); return app.exec(); }
Edit: I was able to fix this issue by setting FocusPolicy to NoFocus on the buttons. After that I added required functionality under QListWidget::itemActivated(QListWidgetItem*) signal.
In addition, I moved recently from 4.6.2 to 4.6.3. I noticed that during the compilation I get warnings from the MMPFile (even when compiling an empty project). I have ignored these warning because everything seems to be working. Is there any way to remove those SYSTEMINCLUDE paths from the automatically generated MMP file (in case they are not required)?
Code:perl -S makmake.pl -D \Symbian\tests\listwidget\LISTWIDGET_0XEEB5F06F GCCE MMPFILE "\Symbian\tests\listwidget\LISTWIDGET_0XEEB5F06F.MMP" WARNING: \Symbian\tests\listwidget\LISTWIDGET_0XEEB5F06F.MMP(47) : SYSTEMINCLUDE path "\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\osextensions\stdapis\" not found WARNING: \Symbian\tests\listwidget\LISTWIDGET_0XEEB5F06F.MMP(48) : SYSTEMINCLUDE path "\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\osextensions\stdapis\sys\" not found WARNING: \Symbian\tests\listwidget\LISTWIDGET_0XEEB5F06F.MMP(51) : SYSTEMINCLUDE path "\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\osextensions\stdapis\stlport\" not found WARNING: \Symbian\tests\listwidget\LISTWIDGET_0XEEB5F06F.MMP(53) : SYSTEMINCLUDE path "\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\oem\" not found WARNING: \Symbian\tests\listwidget\LISTWIDGET_0XEEB5F06F.MMP(56) : SYSTEMINCLUDE path "\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\osextensions\" not found WARNING: \Symbian\tests\listwidget\LISTWIDGET_0XEEB5F06F.MMP(57) : SYSTEMINCLUDE path "\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\domain\osextensions\" not found WARNING: \Symbian\tests\listwidget\LISTWIDGET_0XEEB5F06F.MMP(58) : SYSTEMINCLUDE path "\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\domain\osextensions\loc\" not found WARNING: \Symbian\tests\listwidget\LISTWIDGET_0XEEB5F06F.MMP(60) : SYSTEMINCLUDE path "\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\domain\osextensions\loc\sc\" not found WARNING: \Symbian\tests\listwidget\LISTWIDGET_0XEEB5F06F.MMP(61) : SYSTEMINCLUDE path "\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\domain\middleware\loc\sc\" not found
Environment: Win7, Qt4.6.2/3, QtCreator 1.3.1 and Nokia E51/E71



