摘要: setWindowFlags(windowFlags()&~Qt::WindowMinMaxButtonsHint); 其中&~ 是按位与 操作 阅读全文
posted @ 2021-02-10 20:12 tonny1000 阅读(647) 评论(0) 推荐(0)
摘要: db = QSqlDatabase::addDatabase("QMYSQL"); //连接的MYSQL的数据库驱动 db.setHostName("localhost"); //主机名 db.setPort(3306); //端口 db.setDatabaseName("test"); //数据库 阅读全文
posted @ 2021-02-10 20:10 tonny1000 阅读(47) 评论(0) 推荐(0)
摘要: m_set = new QSettings("userinfo.ini", QSettings::IniFormat); //读取userinfo.ini文件 return m_set->value("info/cli_ver", "").toString();// 读取 info 下的 cli_v 阅读全文
posted @ 2021-02-10 20:08 tonny1000 阅读(87) 评论(0) 推荐(0)
摘要: QFile file("userinfo.ini"); file.open(QIODevice::Text | QIODevice::WriteOnly); QTextStream out(&file); out << "[info]" << endl << "id=" //其中 endl 就是回车 阅读全文
posted @ 2021-02-10 20:04 tonny1000 阅读(581) 评论(0) 推荐(0)
摘要: QT 通过QProcess 加载外部应用 QProcess.start("应用.exe");这个是同步加载,系统随着应用的退出,所加持的应用程序也会被退出; QProcess.startDetacher("应用.exe")这个是异步加载,系统运行应用后,系统退出,不影响应用的继续执行,在通过更新的应 阅读全文
posted @ 2021-02-10 20:01 tonny1000 阅读(199) 评论(0) 推荐(0)
摘要: playList = new QMediaPlaylist(this); //创建 播放列别 player = new QMediaPlayer(this);//创建播放器 // playList->setPlaybackMode(QMediaPlaylist::Loop);// 通过设置 播放列表 阅读全文
posted @ 2021-02-10 19:57 tonny1000 阅读(4440) 评论(0) 推荐(0)