int main(int argc, char **argv){ QApplication app(argc, argv); QString str1 = "Test"; QByteArray ba = str1.toLatin1(); const char *c_str2 = ba.data(); printf("str2: %s", c_str2); return app.exec();}
QIcon img("/img/ico.bmp");button.setIcon(img);button.setIconSize(QSize(button.width(), button.height()));