当前位置:网站首页>QT handy notes (VI) -- update interface, screenshot, file dialog box
QT handy notes (VI) -- update interface, screenshot, file dialog box
2022-07-26 09:33:00 【Flying 123_ one hundred and twenty-three】
One 、 Update the interface
update();// Not in time
qApp->processEvents();// update
Two 、 Capture and save
QScreen * screen = QGuiApplication::primaryScreen();
QPixmap p = screen->grabWindow(ui.CO_chart->winId());
QImage image = p.toImage();
QString name = path + "123.png";
image.save(name);
3、 ... and 、 File dialog , Get file name and path
QString OpenFile;// File path + file name
QString OpenFilePath;// File path
// Open file in folder
OpenFile = QFileDialog::getOpenFileName(this,
"",
"",
"(*.txt);;All(*.*)");
// According to the path
QFileInfo OpenFileInfo;
OpenFileInfo = QFileInfo(OpenFile);
OpenFilePath = OpenFileInfo.path(); // route
边栏推荐
猜你喜欢

arc-gis的基本使用2

Fiddler下载安装

高斯消元求解矩阵的逆(gauss)

注册模块用例编写
![[MySQL] understand the important architecture of MySQL (I)](/img/89/5fb595b0112fac987626857b76f9a4.png)
[MySQL] understand the important architecture of MySQL (I)

Search module use case writing

js中树与数组的相互转化(树的子节点若为空隐藏children字段)

附加到进程之后,断点显示“当前不会命中断点 还没有为该文档加载任何符号”

Does volatile rely on the MESI protocol to solve the visibility problem? (top)

Basic use of ArcGIS 1
随机推荐
微信小程序图片无法显示时显示默认图片
Login module use case writing
Solve "note: one or more layouts are missing the layout_width or layout_height attributes."
Basic use of ArcGIS 1
Drawing shadow error diagram with MATLAB
调用DLL开启线程的问题
大二上第一周学习笔记
Neural network and deep learning-6-support vector machine 1-pytorch
Add DLL
v-premission添加权限
莫队学习笔记(一)
Fiddler下载安装
附加到进程之后,断点显示“当前不会命中断点 还没有为该文档加载任何符号”
Mo team learning notes (I)
docker配置mysql集群
解决IE7 & IE8 存储cookie问题
TabbarController的封装
el-table的formatter属性的用法
el-table实现增加/删除行,某参数跟着变
tabbarController的使用