简体   繁体   English

是否可以选择在Qt中再次运行同一程序?

[英]Is there an option to run second time the same program in Qt?

I'm creating simple online game in Qt Creator. 我正在Qt Creator中创建简单的在线游戏。 I've created server project which analyse received data and take decisions. 我创建了服务器项目,该项目可以分析接收到的数据并做出决策。 Also I created player project which sends requests to server for permission to move, shoot etc. Player project should be universal for Player 1 and Player 2. 我还创建了播放器项目,该请求向服务器发送了移动,射击等权限的请求。播放器项目对于播放器1和播放器2应该是通用的。

Is there an option to run player project twice in Qt Creator? 是否可以在Qt Creator中两次运行播放器项目? I need it to test how server and player project behaves when second player connects. 我需要它来测试第二个播放器连接时服务器和播放器项目的行为。

I'm using Qt Creator 4.3.1: You can do that in Tools > Options... > Build & Run . 我正在使用Qt Creator 4.3.1:您可以在“ 工具” >“ 选项...” >“ 构建并运行”中进行操作 Under the General tab, set the " Stop applications before building: " to " None " 在“ 常规”选项卡下,将“ 构建之前停止应用程序: ”设置为“

Open 3 Qt Creators, 1 for the server 2 for the players and then run all of them. 打开3个Qt Creator,为服务器2个,为播放器1个,然后运行所有。 I have made a server-client multiplayer game in Qt and that is how i tested it. 我已经在Qt中制作了服务器-客户端多人游戏,这就是我对其进行测试的方式。 For every client(player) open a Qt Creator. 为每个客户(玩家)打开一个Qt Creator。

EDIT: You can also create release versions and start them, but you waste a lot of time creating a release version every time you want to debug. 编辑:您还可以创建发行版本并启动它们,但是每次调试时您都会浪费大量时间创建发行版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM