Results 1 to 10 of 10

Thread: Can a QCompleter emit a signal of index of position of its inside list, by clicking?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Can a QCompleter emit a signal of index of position of its inside list, by clicki

    QCompleter works on an option list provided by a model. The convenience constructor taking a QStringList builds that model for you, but it still exists. The row numbers in the model, probably a QStringListModel, correspond to the indices of the original list. So, when the completer tells you the QModelIndex of the activated item you know which QStringList entry that was: index.row()

  2. The following user says thank you to ChrisW67 for this useful post:

    Alex22 (23rd January 2016)

Similar Threads

  1. Seems that my emit doesn't emit the signal
    By roseicollis in forum Newbie
    Replies: 2
    Last Post: 19th January 2015, 16:05
  2. Replies: 1
    Last Post: 12th January 2011, 22:40
  3. Replies: 0
    Last Post: 4th April 2010, 17:42
  4. emit a signal from inside a callback routine
    By franco.amato in forum Qt Programming
    Replies: 20
    Last Post: 21st January 2010, 18:05
  5. eventFilter and clicking inside QSpinBox
    By T4ng10r in forum Qt Programming
    Replies: 2
    Last Post: 6th March 2007, 21:02

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.