Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    I have a question about ComboBox

    General and Desktop
    3
    6
    1678
    Loading More Posts
    • 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
      awesomesean last edited by

      Hi guys,

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

      Thank you,

      1 Reply Last reply Reply Quote 0
      • A
        andre last edited by

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

        1 Reply Last reply Reply Quote 0
        • A
          awesomesean last edited by

          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 Reply Quote 0
          • A
            andre last edited by

            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 Reply Quote 0
            • B
              broadpeak last edited by

              Should be: setCurrentIndex()

              1 Reply Last reply Reply Quote 0
              • A
                awesomesean last edited by

                That is what I want!! Thanks guys!!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post