fix: 修复启动白屏与地图崩溃问题

- SetUseOpenGL(false): QGLWidget 在当前系统不兼容,改用软件渲染
- ExtensionHost_v2: 添加 contributionRegistry() getter 修复空指针
- main.cpp: 两阶段启动 (show → QTimer::singleShot → initialize)
- mainwindow: 分离构造函数与 initialize(),结尾调用 onTabIndexChanged(3)
- 修复 Qt DLL 部署:使用 windeployqt 确保运行时库版本匹配
This commit is contained in:
2026-06-02 19:01:24 +08:00
parent 94fcdb12e0
commit 61cd75cd56
39 changed files with 2994 additions and 1258 deletions
+46
View File
@@ -0,0 +1,46 @@
#ifndef LOGVIEWER_H
#define LOGVIEWER_H
#include <QWidget>
#include <QTextEdit>
#include <QComboBox>
#include <QPushButton>
#include <QLineEdit>
#include <QLabel>
#include <QCheckBox>
class LogViewer : public QWidget
{
Q_OBJECT
public:
explicit LogViewer(QWidget *parent = nullptr);
~LogViewer() override = default;
private slots:
void onFilterChanged(const QString &text);
void onLevelChanged(int index);
void onClear();
void onExport();
void onAutoScrollToggled(bool enabled);
private:
void installMessageHandler();
void restoreMessageHandler();
static void logMessageHandler(QtMsgType type,
const QMessageLogContext &context,
const QString &msg);
QTextEdit *m_logView;
QLineEdit *m_filterEdit;
QComboBox *m_levelCombo;
QCheckBox *m_autoScroll;
QPushButton *m_clearBtn;
QPushButton *m_exportBtn;
QLabel *m_countLabel;
int m_logCount = 0;
static LogViewer *s_instance;
static QtMessageHandler s_oldHandler;
};
#endif