diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py
index 32821c7afd65ee479ef914cdca2ae2a16dbd1457..7aff291bf31aad6f177f4869b6780ff672bad558 100644
--- a/tests/system/shared/project.py
+++ b/tests/system/shared/project.py
@@ -169,7 +169,13 @@ def createProject_Qt_GUI(path, projectName, qtVersion = None, checks = True):
         if platform.system() in ('Windows', 'Microsoft'):
             path = os.path.abspath(path)
         path = os.path.join(path, projectName)
-        expectedFiles = [path, cpp_file, h_file, ui_file, pro_file]
+        expectedFiles = [path]
+        tmpList = ["main.cpp", cpp_file, h_file, ui_file, pro_file]
+        if platform.system() in ('Windows', 'Microsoft'):
+            tmpList.sort(key=str.lower)
+        else:
+            tmpList.sort()
+        expectedFiles.extend(tmpList)
     __createProjectHandleLastPage__(expectedFiles)
 
     waitForSignal("{type='CppTools::Internal::CppModelManager' unnamed='1'}", "sourceFilesRefreshed(QStringList)", 20000)