Results 1 to 5 of 5

Thread: Search value in QList

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2019
    Posts
    2
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question Search value in QList

    Hi everyone

    I'm programming in qt, with qt 5 and i have a dude. I have a QList<double> list; and this list list contain much values.
    Example:
    Qt Code:
    1. (7.41043, 7.6002, 7.41904, 7.41041, 7.59567, 7.80702, 7.9873, 7.80707, 7.78752, 7.967, 7.78653, 7.96694, 7.40598, 7.40597, 7.5947, 7.76546, 7.94506, 7.82004, 8.0137, 7.99947)
    To copy to clipboard, switch view to plain text mode 

    How can search in the list the value most close to 0 and return this? and know the position in the list?
    Last edited by pelaoqlo; 6th February 2019 at 18:05.

Similar Threads

  1. Replies: 1
    Last Post: 14th November 2012, 22:00
  2. Qlist<QLabel *> in Qlist<QAction*>
    By Naahmi in forum Qt Programming
    Replies: 1
    Last Post: 9th September 2011, 09:53
  3. Fast QList search/access
    By tryinghard in forum Newbie
    Replies: 4
    Last Post: 15th January 2011, 03:00
  4. Replies: 4
    Last Post: 20th August 2010, 14:54
  5. BEst way to search QList for item
    By steg90 in forum Qt Programming
    Replies: 11
    Last Post: 18th July 2007, 10:41

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.