fix: 屏蔽窗口左上角图标相关的系统默认操作

main
cbwu 4 weeks ago
parent 4f393a581c
commit 0452e1b92e

@ -14,7 +14,7 @@ QMAKE_PROJECT_DEPTH = 0
# QMAKE_LFLAGS += /MANIFESTUAC:\"level=\'requireAdministrator\' uiAccess=\'false\'\"
#程序版本
VERSION = 1.1.0.4
VERSION = 1.1.0.5
#程序版本
QMAKE_TARGET_COMPANY = "HTSDFP"

@ -195,9 +195,9 @@ bool DecodeStream::isValidAVFrame(AVFrame *frame) {
}
// 如果需要,添加更多判断条件,例如时间戳或关键帧检查
if (frame->pts == AV_NOPTS_VALUE) {
return false;
}
// if (frame->pts == AV_NOPTS_VALUE) {
// return false;
// }
return true; // 如果所有条件都通过,则认为 AVFrame 有效
}
@ -214,10 +214,10 @@ bool DecodeStream::isValidAVPacket(AVPacket *pkt) {
}
// 检查时间戳
if (pkt->pts == AV_NOPTS_VALUE || pkt->dts == AV_NOPTS_VALUE) {
qDebug() << "Invalid AVPacket: pts or dts is AV_NOPTS_VALUE.\n";
return false;
}
// if (pkt->pts == AV_NOPTS_VALUE || pkt->dts == AV_NOPTS_VALUE) {
// qDebug() << "Invalid AVPacket: pts or dts is AV_NOPTS_VALUE.\n";
// return false;
// }
// 检查流索引(如果是多流)
if (pkt->stream_index < 0) {

@ -288,10 +288,10 @@ bool ReadStream::isValidAVPacket(AVPacket *pkt) {
}
// 检查时间戳
if (pkt->pts == AV_NOPTS_VALUE || pkt->dts == AV_NOPTS_VALUE) {
qDebug() << "Invalid AVPacket 0: pts or dts is AV_NOPTS_VALUE.\n";
return false;
}
// if (pkt->pts == AV_NOPTS_VALUE || pkt->dts == AV_NOPTS_VALUE) {
// qDebug() << "Invalid AVPacket 0: pts or dts is AV_NOPTS_VALUE.\n";
// return false;
// }
// 检查流索引(如果是多流)
if (pkt->stream_index < 0) {

@ -2,7 +2,7 @@
global::global() {}
QString g_SoftwareVersion = "版本号V1.1.0.5_20250207";
QString g_SoftwareVersion = "版本号V1.1.0.6_20250215";
NotifyManager *g_notifyManager = nullptr;

@ -423,3 +423,19 @@ void MainWindow::initNotifyManager() {
g_notifyManager->setDisplayTime(2000);
g_notifyManager->setNotifyWndSize(300, 60);
}
bool MainWindow::nativeEvent(const QByteArray &eventType, void *message,
qintptr *result) {
#ifdef Q_OS_WIN
MSG *msg = (MSG *)message;
if (msg->message == WM_SYSCOMMAND) {
if (61587 == msg->wParam) { // 单击事件
return true;
}
if (61539 == msg->wParam) { // 双击事件
return true;
}
}
#endif
return QMainWindow::nativeEvent(eventType, message, result);
}

@ -20,9 +20,9 @@
#include "Src/RescueLoad/rescueloadwidget.h"
#ifdef Q_OS_WIN
// #include <QWindow>
// #include <WinUser.h>
// #include <windows.h>
#include "windows.h"
#include "windowsx.h"
#pragma comment(lib, "user32.lib")
#endif
QT_BEGIN_NAMESPACE
namespace Ui {
@ -46,6 +46,10 @@ public:
void initWindow();
void initButton();
void initSignalSlot();
protected:
bool nativeEvent(const QByteArray &eventType, void *message,
qintptr *result);
private slots:
void toolButton_clicked();
void toolButton_2_clicked();

@ -261,7 +261,7 @@
</action>
<action name="toolbar_action2">
<property name="icon">
<iconset resource="mainwindow.qrc">
<iconset>
<normaloff>:/res/GDDC.png</normaloff>:/res/GDDC.png</iconset>
</property>
<property name="text">
@ -273,7 +273,7 @@
</action>
<action name="toolbar_action3">
<property name="icon">
<iconset resource="mainwindow.qrc">
<iconset>
<normaloff>:/res/LChain.png</normaloff>:/res/LChain.png</iconset>
</property>
<property name="text">
@ -347,8 +347,6 @@
</property>
</action>
</widget>
<resources>
<include location="mainwindow.qrc"/>
</resources>
<resources/>
<connections/>
</ui>

Loading…
Cancel
Save