当前位置:网站首页>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
边栏推荐
- After attaching to the process, the breakpoint displays "currently will not hit the breakpoint, and no symbols have been loaded for this document"
- nodejs服务后台执行(forever)
- TabbarController的封装
- matlab中的AR模型短时预测交通流
- (2) Hand eye calibration of face scanner and manipulator (eye out of hand: nine point calibration)
- V-for dynamically sets the SRC of img
- Add DLL
- POJ 1012 Joseph
- 暑假末尾学习笔记
- 如何添加一个PDB
猜你喜欢
随机推荐
nodejs服务后台执行(forever)
TableviewCell高度自适应
wap端微信h5支付,用于非微信浏览器
C managed and unmanaged
Gauss elimination
a-table中的rowSelection清空问题
What is asynchronous operation
v-for动态设置img的src
Arc GIS basic operation 3
调用DLL开启线程的问题
微信小程序图片无法显示时显示默认图片
The problem of the sum of leetcode three numbers
The difference between thread join and object wait
arcgis的基本使用4
CSV data file settings of JMeter configuration components
phpexcel导出emoji符号报错
Global variables in DLL
2020-12-29
Implementation of fragment lazy loading after multi-layer nesting
MySQL transaction