QTableWidget::itemSelectionChanged
-
Hi,
What exactly do you mean by "drag the mouse" ? If you just hover your mouse over your view, then there's no change in the current selected row/item.
-
@Megamouse
Hi
What Qt version are u using ?
I cant seem to reproducing it not calling currentRow on drag to extend selection or
on single selection only. -
@Megamouse
Hi
So do ivoid MainWindow::on_listWidget_currentRowChanged(int currentRow) { ui->label->setText( QString::number(currentRow) ); }
Update:
You mean u manually call currentRow and then its out of sync? -
@Megamouse
Hi
Tried withvoid MainWindow::on_listWidget_itemSelectionChanged() { ui->label->setText( QString::number(ui->listWidget->currentRow()) ); }
and it follows fine. So not sure why you see different results.
(also using 5.11.1)- 5.11.1 that completely broke the nativeevent message
in what way ?
- 5.11.1 that completely broke the nativeevent message
-
Can you send me the sample you use?
For the nativeevent:
Apparently it is already fixed for Qt 5.11.2.
But to explain:
One of the devs added a copy pasta mistake and now we need to cast the nativeEvent messages like this for Qt 5.11.1:#if (QT_VERSION == QT_VERSION_CHECK(5, 11, 1)) MSG* msg = *reinterpret_cast<MSG**>(message); #else MSG* msg = reinterpret_cast<MSG*>(message); #endif
For some programs this breaks the whole application
-
@Megamouse
ofc but its just default gui project with ListWidget
https://www.dropbox.com/s/y6dxx17dd6mc1cd/untitled68.zip?dl=0oh, i see. type was changed to **
Well good they fixed it so fast :) -
@Megamouse
Ah, yes, now i can do it too.
Holding left and rapid move up and down seems to lag behind one.
Funny enough the signal is correct. (right side)
Seems to be the order of signals.
As if i make a buttonvoid MainWindow::on_pushButton_released() { ui->label->setText( QString::number(ui->listWidget->currentRow()) ); }
and then ask it, its correct.
so it seems when in itemSelectionChanged and not released the left buttons, its
not updated yet. -
@Megamouse
Well it might be border case and hence the slightly odd behavior.
Since we are using SingleSelection, the dragging is really not needed as user
can just click on the one he wants. -
Well did you try the signal for that. seems to be correct even
when ui->listWidget->currentRow() is off. ? -
indeed it is.
-
@Megamouse
native events!
How did you find it? where they announced something like that?
but thank you ... you saved my life ;) -
@HojjatJafary It was on a hunch. After searching for native event problems for a while, I found an issue on the Qt issue tracker in which the solution to the bug was shared in the comment section.