Jelajahi Sumber

Set icon in Linux Project Manager executable (#8361)

Signed-off-by: nggieber <[email protected]>
AMZN-nggieber 3 tahun lalu
induk
melakukan
7c230da37e
1 mengubah file dengan 4 tambahan dan 0 penghapusan
  1. 4 0
      Code/Tools/ProjectManager/Source/Application.cpp

+ 4 - 0
Code/Tools/ProjectManager/Source/Application.cpp

@@ -22,6 +22,7 @@
 #include <QDir>
 #include <QMessageBox>
 #include <QInputDialog>
+#include <QIcon>
 
 namespace O3DE::ProjectManager
 {
@@ -69,6 +70,9 @@ namespace O3DE::ProjectManager
             AZ_Warning("ProjectManager", false, "Failed to init logging");
         }
 
+        // Set window icon after QGuiApplication is created otherwise QPixmap for the icon fails to intialize
+        QApplication::setWindowIcon(QIcon(":/ProjectManager-Icon.ico"));
+
         m_pythonBindings = AZStd::make_unique<PythonBindings>(GetEngineRoot());
 
         if (!m_pythonBindings->PythonStarted())