Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QString .arg() operation
Forum Updated to NodeBB v4.3 + New Features

QString .arg() operation

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 462 Views 3 Watching
  • 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.
  • G Offline
    G Offline
    GregWilsonLindberg
    wrote on last edited by
    #1

    Does anyone know of any documentation on how .arg() works in QML. How much of the functionality from C++ has been ported into QML, i.e. can I use .arg(integerVar, 2, 16, '0') to get hex output? I'm asking about Qt5.15 currently, but also would like to know if the functionality has been improved in Qt6.x.

    Regards,
    Greg Wilson-Lindberg

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      It's not much but maybe will help: https://doc.qt.io/qt-5/qml-qtqml-string.html#arg-method

      (Z(:^

      1 Reply Last reply
      0
      • G Offline
        G Offline
        GregWilsonLindberg
        wrote on last edited by
        #3

        I've seen that and also found something online that indicated that you could pass a field width argument and if it was negative it would left align. I was really more interested in other things that you can do with C++ arg's, such as converting the base of a numeric argument.
        Thanks,
        Greg

        1 Reply Last reply
        0

        • Login

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