Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Help with QString
Forum Updated to NodeBB v4.3 + New Features

Help with QString

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 768 Views 1 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.
  • P Offline
    P Offline
    ProgrammerAtHeart3344
    wrote on last edited by
    #1

    I'm trying to print none string values using QString but can't figure out how it's done, I remember it being like this:
    @
    QString str = QString("%, %").arg(centeralRect->left()).arg(centeralRect->top());@

    but that doesn't really print what I expected.

    !http://puu.sh/3jKrc.jpg()!

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      Markers are %1, %2 etc.
      "QString::arg()":http://qt-project.org/doc/qt-5.0/qtcore/qstring.html#arg

      1 Reply Last reply
      0
      • P Offline
        P Offline
        ProgrammerAtHeart3344
        wrote on last edited by
        #3

        ah thanks

        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