Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to connect 2 QCombobox by focus?
Qt 6.12 LTS is out! See what's new in the release blog

How to connect 2 QCombobox by focus?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 346 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vinh
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • gde23G Offline
      gde23G Offline
      gde23
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      3

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt
      • Unsolved