How to create hexadecimal digits of capital using QString :: arg ()? [QT]

I am trying to create a QString that is a hexadecimal number with its letters in Capitals instead of small caps, how can this be done?

QString( " %1" ).arg( 15, 1, 16 )

gives f, and I would likef

+3
source share
1 answer

Converting a string to uppercase:

QString( " %1" ).arg( 15, 1, 16 ).toUpper();

This returns an uppercase string. This method was called upper () in qt3.

+8
source

Source: https://habr.com/ru/post/1750750/


All Articles