Qt 获取字符串的UTF8编码值

    ui->setupUi(this);  
    QString s = QString::fromUtf8("推广礼包");  
      
    QString unicode16 = QString("");  
      
    for(QString::iterator i = s.begin(); i != s.end(); ++i)  
        unicode16 += QString::number(i->unicode(),16) + " ";  
      
    ui->label->setText(unicode16);</span>  

猜你喜欢

转载自blog.csdn.net/lengyuezuixue/article/details/80757024
今日推荐