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. Combo Box is not updating properly in QDialog.
Forum Updated to NodeBB v4.3 + New Features

Combo Box is not updating properly in QDialog.

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 349 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.
  • A Offline
    A Offline
    Ayush Gupta
    wrote on last edited by
    #1

    I have two dialog combo box in my dialog Box.

    Then I am adding some items to one combo box.

    Then I am trying to launch dialog box using dialogboxtest->exec().

    After that I am connecting event ComboBox currentIndexChanged(QString).

    So after that my slot is called then I tried to send one event to my other plugin than that plugin will resend one event that I am capturing in my QDialog code plugin and adding the items in second combo box.

    But the items are not added in Combo box instantly. When I close my dialog box then again open
    then those options are visible in my second combo box.

    How can I do that without closing dialog box my second combo box should be updated.

    jsulmJ 1 Reply Last reply
    0
    • A Ayush Gupta

      I have two dialog combo box in my dialog Box.

      Then I am adding some items to one combo box.

      Then I am trying to launch dialog box using dialogboxtest->exec().

      After that I am connecting event ComboBox currentIndexChanged(QString).

      So after that my slot is called then I tried to send one event to my other plugin than that plugin will resend one event that I am capturing in my QDialog code plugin and adding the items in second combo box.

      But the items are not added in Combo box instantly. When I close my dialog box then again open
      then those options are visible in my second combo box.

      How can I do that without closing dialog box my second combo box should be updated.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @ayush-gupta said in Combo Box is not updating properly in QDialog.:

      dialogboxtest->exec()

      This call is blocking!
      Everything after this line will be executed when you close the dialog.
      So, you should do this: "After that I am connecting event ComboBox currentIndexChanged(QString)." before you call exec().

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

      1 Reply Last reply
      3
      • A Offline
        A Offline
        Ayush Gupta
        wrote on last edited by
        #3

        You are right.Thanks.
        This is blocking call.

        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