2011-07-28 100 views

回答

1

使用QDesktopWidget訪問多頭系統上的屏幕信息。

這裏是僞代碼,使小部件覆蓋第一屏幕。

QDesktopWidget *pDesktop = QApplication::desktop(); 

//Get 1st screen's geometry 
QRect RectScreen0 = pDesktop->screenGeometry (0); 

//Move the widget to first screen without changing its geometry 
my_Widget->move (RectScreen0.left(),RectScreen0.top()); 

my_pWidget->resize (RectScreen0.width(),RectScreen0.height()); 

my_Widget->showMaximized(); 
+0

完美。謝謝! – Anoop

相關問題