Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt\QML Unit Converter (Metric\Imperial)
Forum Updated to NodeBB v4.3 + New Features

Qt\QML Unit Converter (Metric\Imperial)

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
qt5c++ qtcan busconversionsqml types
2 Posts 2 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    simone.malvezzi
    wrote on 26 May 2020, 08:52 last edited by
    #1

    Hi;
    I'm looking for a complete unit converter written for Qt\C++ (Metric\Imperial(US)\Imperial(UK)).
    Doing so with some c++ classes could be a simple task, but I was wondering if there's something already implemented in Qt. I checked documentation and I don't find anything on API supporting these type conversion (Engineering software does use a lot those kind of functions and having this directly in Qt APIs could be really useful).
    I saw that there's something related to Locale QML. But I'm not sure that I can achieve this using javascript and I would prefer something written on c++ for performance purposes.

    Any help would be appreciated. Thanks!

    J 1 Reply Last reply 26 May 2020, 09:23
    0
    • S simone.malvezzi
      26 May 2020, 08:52

      Hi;
      I'm looking for a complete unit converter written for Qt\C++ (Metric\Imperial(US)\Imperial(UK)).
      Doing so with some c++ classes could be a simple task, but I was wondering if there's something already implemented in Qt. I checked documentation and I don't find anything on API supporting these type conversion (Engineering software does use a lot those kind of functions and having this directly in Qt APIs could be really useful).
      I saw that there's something related to Locale QML. But I'm not sure that I can achieve this using javascript and I would prefer something written on c++ for performance purposes.

      Any help would be appreciated. Thanks!

      J Offline
      J Offline
      JonB
      wrote on 26 May 2020, 09:23 last edited by JonB
      #2

      @simone-malvezzi
      No, Qt does not supply a set of measurement conversion tables, that's not its job. You could write it yourself, see if there is any pre-written C++ libraries/tables provided, or possibly grab them off the net, either dynamically or statically.

      As an aside, you will have to decide how "complete" you want to be. Personally I am great fan of Imperial instead of this Metric rubbish, but even I don't measure in "rods", "poles" & "perches" (e.g. http://www.northcravenheritage.org.uk/NCHTJto2009/Journals/2006/RodsPolesPerches/RodsPolesPerches.html) ;-) Though --- and I'm sure you're fascinated --- in winter I measure temperature in Centigrade but in summer I measure in Farenheit....

      1 Reply Last reply
      0

      2/2

      26 May 2020, 09:23

      • Login

      • Login or register to search.
      2 out of 2
      • First post
        2/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved