//Процедура запуска другого приложенияint spawn (const char *name_program, // Имя исполняемого файла const char *parametr// Параметр ){ char *arg_list[] = {const_cast<char*>(name_program), const_cast<char*>(parametr), NULL}; #ifdef Q_WS_X11 pid_t id_process; id_process = fork(); if (id_process != 0) { return id_process; } else { //char *par = arg_list[0]; execvp(name_program, arg_list); abort(); }#endif#ifdef Q_WS_WIN int id_process = -1; char commandline[256];//(char *)name_program; if ((parametr!="")&&(parametr!=NULL)) { strcpy(commandline, name_program); strcat(commandline, (const char*)" "); strcat(commandline, parametr); } STARTUPINFOA cif; ZeroMemory(&cif, sizeof(STARTUPINFO)); cif.cb = sizeof(STARTUPINFO); PROCESS_INFORMATION pi; if (CreateProcessA(name_program, commandline, NULL, NULL, FALSE, NULL, NULL, NULL, &cif, &pi)) return id_process; else return -1;#endif }