QPushButton does not respond when first time click?
Unsolved
General and Desktop
-
When I have a
QListWidget
and aQPushButton
, have selected a listItem, then click pushbutton, why does it only respond when I click at second time? -
Hi
Show the code. Impossible to guess at when you are not showing what button
does on clicked() -
This post is deleted!
-
Ah, i see from your deleted post what you say.
When QListWidget is clicked first time, it receives focus
When you then click a button, that button is now given focus.
Focus is not the same as selected for QListWidget.- one or more item can be selected.
You can try
qDebug() << ui->listWidget->currentItem()->text();
in button.