Hi,
i have three QListWidgets: FileList, DateList and Filesize.
When I scroll inside my FileList, I want that the DateList and Filesize scrolls to the same position like the FileList.
I have a function for the wheelevent. Inside I have this code:
QScrollBar *vb
= ui
->listWidget
->verticalScrollBar
();
int v = vb->value();
QScrollBar *vbDate
= ui
->listWidgetDate
->verticalScrollBar
();
vbDate->setValue(v);
QScrollBar *vbSize
= ui
->listWidgetSize
->verticalScrollBar
();
vbSize->setValue(v);
QScrollBar *vb = ui->listWidget->verticalScrollBar();
int v = vb->value();
QScrollBar *vbDate = ui->listWidgetDate->verticalScrollBar();
vbDate->setValue(v);
QScrollBar *vbSize = ui->listWidgetSize->verticalScrollBar();
vbSize->setValue(v);
To copy to clipboard, switch view to plain text mode
The strange thing is that the mouse delta only changes when i reached the end of the list. Or the top of the list. And then the position of the other two lists changes.
To say it in other words: Outside of the listwidget every mouse wheel turn is recognized but inside the list widget I have to scroll down to the end or to the top.
Bookmarks