gitee:https://gitee.com/linghuzhangmen/qtframeless
截图
Qt6.4可编译
(1)自定义标题栏、可拖动、拉伸;
(2)支持linux,windows;
(3)客户区可自定义窗体, 实现各种布局;
使用QtCreator打开pro文件即可,运行需要参考如下代码:
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTranslator* trans = new QTranslator();
// 运行时需要把翻译文件复制到exe所在的translations目录
QString qm_path = a.applicationDirPath() + "/translations/zhcnlang.qm";
bool isOk = trans->load(qm_path);
if(!isOk)
{
QMessageBox::information(nullptr, "Attention", "Language file lost");
exit(0);
}
a.installTranslator(trans);
Widget w;
w.show();
return a.exec();
}