Commit d0505d80 authored by captainwong's avatar captainwong

fix qt linux

parent 37f8dbe7
...@@ -6,7 +6,9 @@ ...@@ -6,7 +6,9 @@
#include <QColor> #include <QColor>
#include <QPixmap> #include <QPixmap>
#include <QApplication> #include <QApplication>
#ifdef Q_OS_WIN
#include <QDesktopwidget> #include <QDesktopwidget>
#endif
#include <QIcon> #include <QIcon>
#include <QTimer> #include <QTimer>
#include <QDir> #include <QDir>
...@@ -52,6 +54,7 @@ inline void non_blocking_wait_in_ui_thread(int ms, QString log = "") { ...@@ -52,6 +54,7 @@ inline void non_blocking_wait_in_ui_thread(int ms, QString log = "") {
} }
} }
#ifdef Q_OS_WIN
/** /**
* @brief 在文件夹中显示 * @brief 在文件夹中显示
* @param pathIn 若为文件路径则在文件夹中显示,若为文件夹路径则打开改文件夹 * @param pathIn 若为文件路径则在文件夹中显示,若为文件夹路径则打开改文件夹
...@@ -64,6 +67,7 @@ inline void showInGraphicalShell(const QString &pathIn) { ...@@ -64,6 +67,7 @@ inline void showInGraphicalShell(const QString &pathIn) {
QString command = "explorer.exe " + param; QString command = "explorer.exe " + param;
QProcess::startDetached(command); QProcess::startDetached(command);
} }
#endif
inline bool warn_if_load_pixmap_failed(QPixmap& pixmap, QString icon_path, QString file_line, bool forceUseQss = true) inline bool warn_if_load_pixmap_failed(QPixmap& pixmap, QString icon_path, QString file_line, bool forceUseQss = true)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment