Results 1 to 2 of 2

Thread: Less system cost

  1. #1
    Join Date
    Jun 2011
    Location
    Porto Alegre, Brazil
    Posts
    482
    Thanks
    165
    Thanked 2 Times in 2 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Less system cost

    Hello!

    A quick question this time:

    what is less system costfull: use and do some quick calculations using double, or convert a number from QString to float and than to that same calculations using float?


    Context:

    Using QDoubleSpinBox for number inputs, where I can choose to use the Changed slot picking a double value or the value as a QString.

    Thanks,

    Momergil

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Less system cost

    Quote Originally Posted by Momergil View Post
    Hello!

    A quick question this time:

    what is less system costfull: use and do some quick calculations using double, or convert a number from QString to float and than to that same calculations using float?
    Using double all the way is less expensive than keeping a string and converting it to a float.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    Momergil (12th October 2012)

Similar Threads

  1. Replies: 8
    Last Post: 21st March 2011, 12:40
  2. Cost of pure virtual
    By ShaChris23 in forum General Programming
    Replies: 4
    Last Post: 4th November 2007, 18:20
  3. cost of emitting signal
    By quickNitin in forum Newbie
    Replies: 1
    Last Post: 29th November 2006, 08:53
  4. who can help me? It cost me many days.
    By diaryon0 in forum General Programming
    Replies: 1
    Last Post: 23rd April 2006, 09:48

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.