Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Exiting QComboBox and reading content
Forum Updated to NodeBB v4.3 + New Features

Exiting QComboBox and reading content

Scheduled Pinned Locked Moved Unsolved General and Desktop
qcombobox
4 Posts 3 Posters 1.5k Views 2 Watching
  • 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.
  • G Offline
    G Offline
    gabor53
    wrote on last edited by
    #1

    Hi,
    I have a few combo boxes. To read their content I use currentIndexChanged signal.

    connect (day_Combo,SIGNAL(currentIndexChanged(int)),this,SLOT(addDay(int)));
    

    It works only when I press Enter. If I use the mouse or TAB to exit the combo box, the content is not read.

    What should I do to read the content when exiting with TAB or a mouse click?
    Thank you.

    1 Reply Last reply
    0
    • jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Does the current selected item change if you leave the combo box using tab or mouse?
      Usually you have to select another entry in the combobox either via mouse or moving the selection and pressing enter.
      If you just click in the combobox and then click somethere else then current index does not change and no signal is emitted.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      G 1 Reply Last reply
      0
      • jsulmJ jsulm

        Does the current selected item change if you leave the combo box using tab or mouse?
        Usually you have to select another entry in the combobox either via mouse or moving the selection and pressing enter.
        If you just click in the combobox and then click somethere else then current index does not change and no signal is emitted.

        G Offline
        G Offline
        gabor53
        wrote on last edited by
        #3

        @jsulm
        It does change....

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Isn't QComboBox::activated what you are looking for ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

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