Hi,
I am a complete newbie as regards Qt and I have just started programming with it.
My problem regards SpinBox.

I need to distinguish if the value received from SpinBox depends on:
1. changing value using up down arrows
2. pressing enter
3. editing by hand the value (one digit at a time)

I have found that I can distinguish if the value is enter implementing _editingFinished() function as follows.
I wonder if there is something similar to the hasFocus property for understanding when the changed values depends on clicking up down arrows.


Qt Code:
  1. void MainWindow::on_doubleSpinBox_editingFinished()
  2. {
  3. if (ui->doubleSpinBox->hasFocus()) // Enter
  4. {
  5. qDebug() << "Enter pressed";
  6. }
  7. }
To copy to clipboard, switch view to plain text mode