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. QComboBox not showing new values
Forum Updated to NodeBB v4.3 + New Features

QComboBox not showing new values

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.0k Views 1 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.
  • Z Offline
    Z Offline
    zarnick
    wrote on last edited by
    #1

    Hello, I have around 4 combo boxes on a dialog, each of the combo box should present a data with reference to the value selected on the previous combo box and each combo box has a custom QAbastractTableModel as model, that searches the data from a SQLite database.
    While I can successfully find the new data regarding the boxes, they only show on the combo box after I clicked on it and displayed it's list, even if I emit dataChanged() on each model.
    What I wanted to know is, how can I fix this, so I don't need to clic and reclic on the QComboBox, just to update the other boxes.

    Thank you

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SergioDanielG
      wrote on last edited by
      #2

      Hi zarnick.
      To do something like this, I capture "currentIndexChanged(int index)":http://qt-project.org/doc/qt-5.0/qtwidgets/qcombobox.html#currentIndex-prop and then in a function change other "QComboBox":http://qt-project.org/doc/qt-5.0/qtwidgets/qcombobox.html

      Hope it's util.
      Regards.

      www.ftatv.com.ar El foro argentino de la TV libre

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        zarnick
        wrote on last edited by
        #3

        Hello, that's exactly what I'm doing, but when the other combo box is updated, it only shows the new items when I click at the combo box

        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