Results 1 to 5 of 5

Thread: how to select QComboBox option which matches a QString contents

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2011
    Location
    Bangalore
    Posts
    207
    Thanks
    20
    Thanked 28 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to select QComboBox option which matches a QString contents

    If you already have QComboBox populated and want to set index based on string matching use:
    1. QComboBox::findText() to find index of string.
    2. QComboBox::setCurrentIndex to set appropriated index.

  2. #2
    Join Date
    Jun 2011
    Posts
    26
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: how to select QComboBox option which matches a QString contents

    Thank you pkj.. i got it solved...

Similar Threads

  1. QCombobox contents not adjusting itself properly
    By anju123 in forum Qt Programming
    Replies: 4
    Last Post: 6th April 2016, 21:11
  2. How to select the contents of <a ..> .. </a> in a QTextBrowser
    By Berryblue031 in forum Qt Programming
    Replies: 0
    Last Post: 25th May 2011, 12:31
  3. signals and slot...can i select my option ?
    By salmanmanekia in forum Qt Programming
    Replies: 8
    Last Post: 7th August 2008, 11:44
  4. Contents not Properly Visible in QComboBox
    By merry in forum Qt Programming
    Replies: 4
    Last Post: 25th September 2007, 12:32
  5. Cannot select an item in QComboBox
    By Declan in forum Qt Programming
    Replies: 2
    Last Post: 19th April 2007, 08:08

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.