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. I have a question about ComboBox
QtWS25 Last Chance

I have a question about ComboBox

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 2.0k 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
    awesomesean
    wrote on last edited by
    #1

    Hi guys,

    I have a question about comboBox.
    Is there any public functions like a "SetCurSel" in MFC?

    Thank you,

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      For those of us not familiar with MFC: what does that function do?

      1 Reply Last reply
      0
      • A Offline
        A Offline
        awesomesean
        wrote on last edited by
        #3

        Thanks Andre.

        It is "Selects a string in the list box of a combo box".

        ex)
        @
        int SetCurSel(
        int nSelect
        );

        @

        Thank you,

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          So, like setCurrentIndex() does in [[doc:QComboBox]]? Your example is not very clear. If you want to select based on string, you'll have to use findText() first, and then use the returned index with the aforementioned setCurrentIndex().

          1 Reply Last reply
          0
          • B Offline
            B Offline
            broadpeak
            wrote on last edited by
            #5

            Should be: setCurrentIndex()

            1 Reply Last reply
            0
            • A Offline
              A Offline
              awesomesean
              wrote on last edited by
              #6

              That is what I want!! Thanks guys!!

              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