当前位置:网站首页>Exe file running window embedding QT window
Exe file running window embedding QT window
2022-07-03 08:15:00 【The east wind blows the Willows】
The principle is to use 3 A function FindWindow 、 QWindow::fromWinId and QWidget::createWindowContainer, The specific implementation is as follows :
#pragma once
#include <QtWidgets/QMainWindow>
#include <QProcess>
#include "ui_UE42Qt.h"
class UE42Qt : public QMainWindow
{
Q_OBJECT
public:
UE42Qt(QWidget *parent = Q_NULLPTR);
private:
Ui::UE42QtClass *ui;
private:
QProcess* process;
public:
void StartUE4();
void doInsideUE4(QString const& className, QString const& appName);
};
#include "UE42Qt.h"
#include <Windows.h>
#include <QWindow>
UE42Qt::UE42Qt(QWidget *parent)
: QMainWindow(parent)
{
ui->setupUi(this);
StartUE4();
}
void UE42Qt::StartUE4()
{
// start-up UE4 Program
QString sPath = "./WindowsNoEditor/Che.exe";
process = new QProcess;
process->start(sPath);
Sleep(3000);
if (process->waitForStarted())
边栏推荐
- 数据的存储
- jupyter远程服务器配置以及服务器开机自启
- Oracle queries grouped by time
- 什麼是定義?什麼是聲明?它們有何區別?
- Encoding and decoding of golang URL
- Use filechannel to copy files
- Wpf: solve the problem that materialdesign:dialoghost cannot be closed
- P1896 [scoi2005] non aggression (shape pressure DP)
- JS common basic case sorting (continuous update)
- E: 无法定位软件包 ros-melodic-desktop-full
猜你喜欢

C#课程设计之学生教务管理系统

Are you still watching the weather forecast on TV?

一条通往服务器所有端口的隧道

Get to know unity2 for the first time
![[cocos creator] Click the button to switch the interface](/img/b8/f0fd54a2a197cbfd788990e2806b52.png)
[cocos creator] Click the button to switch the interface

Flex flexible box layout

Zohocrm deluge function application time verification

What is a data type? What is the use of data types?

Unity performance optimization
![[end of 2021] National Meteorological Short Video (Kwai, Tiktok) influence list in December](/img/51/81ceaf8746ec7455ea8abf9f038e81.jpg)
[end of 2021] National Meteorological Short Video (Kwai, Tiktok) influence list in December
随机推荐
haproxy+keepalived集群搭建02
Ilruntime learning - start from scratch
数据分析练习题
[untitled]
Go resolve ID card
the installer has encountered an unexpected error installing this package
Scite change background color
P2622 关灯问题II(状态压缩 搜索)
YOLO系列 --- xml2txt脚本
Golang 时间格式整理
Delete the last character of the string in golang
链式长取值
Xlua task list youyou
ArrayList
Golang string segmentation, substitution and interception
String class
Abstract classes and interfaces
[set theory] order relation (hastu example | divisive relation hastu | inclusive relation hastu | refinement relation hastu)
Classes and objects
MXone Pro自适应2.0影视模板西瓜视频主题苹果cmsV10模板