打开相同的Java(Qt)程序,但窗口位置不同。

huangapple go评论85阅读模式
英文:

Open the same Java (Qt) program but with the windows in different places

问题

以下是您要翻译的内容:

我正在使用IMOD的3dmod程序,它是用Java编写的(我想是使用Qt)。对于我的项目,我经常需要打开多个.mrc文件(3D重建),以及使用以下命令打开放在其中的模型:

3dmod -E 1U my_3d_object_part1.mrc my_model_part1.mod

在完成所有部分(大约5-10个)之后,我需要打开它们以进行比较。

是否有方法可以创建一个Shell脚本来完成这个任务?需要知道文件名几乎相同,只有数字1需要更改。

注意文档中提到“3dmod将接受一些Qt选项(比如-style)”。我不知道这些选项的作用,或者它们是否可以控制启动时的窗口位置。我希望我可以将模型窗口分布在屏幕上,以便一次性查看它们。

我担心这可能是不可能的。是否有方法来控制初始窗口位置的打开?

英文:

I'm using the 3dmod program of IMOD which is coded in Java (using Qt I think). For my project, I often need to open multiple .mrc files (3D reconstruct) as well as the model I've put on it using a command like the following:

3dmod -E 1U my_3d_object_part1.mrc my_model_part1.mod

After doing all the parts (around 5-10), I need to open all of them to compare.

Are there any ways to create a shell script to do this? Knowing that file names are almost identical, only the number 1 will have to change.

Note that the doc says "3dmod will accept some Qt options (such as -style)". I don't know what those options do or if they can control the window position at launch. I am hoping I could distribute my model windows across my screen to see them all at once.

I am concerned this may not be possible. Are there any ways to control the initial window position at opening?

答案1

得分: 1

Qt5应用程序可以使用qwindowgeometry标志来设置其初始大小/位置,示例如下:

./myApp -qwindowgeometry 640x480+50+50

编辑:
在Qt4中,我认为只有在使用X11时,该标志被命名为-geometry

英文:

Qt5 applications can set their initial size/position using the qwindowgeometry flag, like this:

./myApp -qwindowgeometry 640x480+50+50

EDIT:
On Qt4, and I think only if you're using X11, the flag is named -geometry.

huangapple
  • 本文由 发表于 2020年9月24日 20:24:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/64046387.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定