Important: Please read the Qt Code of Conduct -

How to connect 2 QCombobox by focus?

  • I'm have 2 QCombobox, cbxA and cbxB.
    I'm try connect( ui->qlineedited, SIGNAL( returnPressed() ), ui->cbxA, SLOT( setFocus() ) );code run OK, cbxA is focused.
    but connect( ui->cbxA, SIGNAL( ???() ), ui->cbxB, SLOT( setFocus() ) ); I don't know SIGNAL after press enter in QCombobox?
    I'm try so much ex: ui->cbxA->lineEdit() but cbxA don't have QLineEdit, because don't need it,...
    How to connect QCombobox to focus it?

  • look in the documentation to see the signals that QComboBox provides

    I guess currentIndexChanged(int index) is what you should use.

    However, the focussing of the "next" widget typically is not done by signals/slots that set some focus but by the tab order, see here on how to specify tab order.

Log in to reply