Results 1 to 3 of 3

Thread: Conversion of QLists and Qvectors from floats to doubles

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Conversion of QLists and Qvectors from floats to doubles

    I was hoping for a simple test.toDouble()
    QList and QVector are supposed to be generic containers, so they have no methods related to stored datatype. If you want to convert, loop and convert the numbers yourself. Or make your own FloatList, FloatVector, DoubleList, etc. classes, where you can implement conversion methods toFloat(), toDouble() and reuse it in the rest of your code ( and maybe in your other projects ).

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

    mobucl (17th May 2011)

Similar Threads

  1. QList of QLists
    By m15ch4 in forum Newbie
    Replies: 12
    Last Post: 16th October 2013, 22:36
  2. Renaming multidimensional QLists
    By mobucl in forum Newbie
    Replies: 3
    Last Post: 17th December 2010, 09:04
  3. QPainter::drawPixmap with floats ?
    By christophe.daudin in forum Qt Programming
    Replies: 8
    Last Post: 20th October 2009, 10:19
  4. help using QLists as data in QwtPlotCurve
    By esorensen in forum Qwt
    Replies: 1
    Last Post: 11th July 2008, 19:52
  5. QList of Qlists?
    By markcole in forum Qt Programming
    Replies: 6
    Last Post: 8th July 2008, 05:44

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
  •  
Qt is a trademark of The Qt Company.