Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试创建一个 QString,它是一个十六进制数字,其字母数字为大写字母而不是小写字母,怎么做?
QString( " %1" ).arg( 15, 1, 16 )
产量f,我想要F
f
F
通过将字符串转换为大写:
QString( " %1" ).arg( 15, 1, 16 ).toUpper();
这将返回一个大写字符串。该方法在 qt3 中曾被称为 upper()。