1.使QScrollArea的背景透明,2.QString("").split(",")//(""),3.smtp發送附件名亂碼

1.使QScrollArea的背景透明

所以,最後的解決辦法是2步,按順序來:

1:scrollArea->setStyleSheet("QScrollArea {background-color:transparent;}")

2:scrollArea->viewport()->setStyleSheet("background-color:transparent;");

https://www.cnblogs.com/falqs/p/3805003.html

2.   

    qDebug() << QString().split(",");//("")
    qDebug() << QString("").split(",");//
    qDebug() << (QString() == "");//true
    qDebug() << ("" == QString());//true
    qDebug() << (QString("") == "");//true
    qDebug() << QString("").count();//0
    qDebug() << QString().count();//0

本以爲會是0,結果是1,這個還真是不好用啊
3.smtp發送附件名亂碼
    this->file = file;
    this->cType = "application/octet-stream";
    this->cName = QFileInfo(*file).fileName();
    this->cEncoding = Base64;
    this->cCharset = "utf-8";

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章