Where are the limits for Qt types?

喜欢而已 提交于 2019-12-01 15:07:08

There's a high likelihood the Qt types distill down to one of the basic types for which numeric_limits are defined. Have you tried calling e.g., std::numeric_limits<qlonglong>::max()?

As MSalters points out, too, if the types are not builtin numeric_limits can still be specialized for them. If that were the case one would hope Qt would include them.

richardwb

Take a look at the QtGlobal documentation.

For some of the non-obvious ones:
qlonglong - 64-bit
qptrdiff - 32-bit or 64-bit depending on platform
qreal - double (float on ARM architectures)
quintptr - unsigned 32-bit or 64-bit depending on platform
qulonglong - unsigned 64-bit
uchar, uint, ulong, ushort - convenience shorthand for unsigned types

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!