QT的资源文件 前言 一、使用绝对路径 二、在项目中添加资源文件,使用相对路径 1.添加资源文件 2.使用资源文件 总结 前言 本文我们将学习在QT中如何添加资源文件 一、使用绝对路径 在窗口中我们想要添加我们想要的图片,可以这样使用本地的图片 QToolBar *toolBar=new QToolBar(this); addToolBar(Qt::LeftToolBarArea,toolBar); QAction *action