zoukankan      html  css  js  c++  java
  • qt QString

    类型转换:

         1、QString::toLocal8Bit() const , 查看原文介绍:

                    

    Returns the local 8-bit representation of the string as a QByteArray. The returned byte array is undefined if the string contains characters not supported by the local 8-bit encoding.
    QTextCodec::codecForLocale() is used to perform the conversion from Unicode. If the locale encoding could not be determined, this function does the same as toLatin1().
    If this string contains any characters that cannot be encoded in the locale, the returned byte array is undefined. Those characters may be suppressed or replaced by another.

    转换为char(8字节)的, 转换的依据是根据QTextCodec::codecForLocale(),就是宿主机当前语言类型进行转换。

      

                      

  • 相关阅读:
    数论学习之乘法逆元
    数论学习之扩展欧几里得
    数论学习之费马与欧拉
    一次函数
    东南西北
    接水问题
    脱水缩合
    背单词
    单词接龙
    字符串,字符数组
  • 原文地址:https://www.cnblogs.com/hzijone/p/12418918.html
Copyright © 2011-2022 走看看