0
コンソールウィンドウと同じモニターでPyQt GUIを開くことができますが、コンソールウィンドウの場所を検出する方法がわかりません。私は現在、PyQt4 QDesktopWidgetを使用して、希望のモニタにウィンドウを配置します。どんな助けも必要です。guiウィンドウをコンソールウィンドウと同じモニターに移動するにはどうしたらいいですか?
from PyQt4.QtGui import *
## move app to second monitor if available ##
if QDesktopWidget().screenCount() >= 2:
dwgScreen2 = QDesktopWidget().screenGeometry(1)
self.move(dwgScreen2.right() - 350, dwgScreen2.top() + 50)
else:
self.move(10, 10)