• 3183阅读
  • 1回复

QT如何在widget类中设置居中显示? [复制链接]

上一主题 下一主题
离线苍井空
 

只看楼主 倒序阅读 楼主  发表于: 2014-10-11
QT如何在widget类中设置居中显示
离线lyh2668

只看该作者 1楼 发表于: 2014-10-11
QDesktopWidget* desktop = QApplication::desktop ();
int x = (desktop->width () - this->width ()) / 2;
int y = (desktop->height () - this->height ()) / 2;
this->move (x, y);
4条评分好评度+1贡献值+1金钱+10威望+1
fghfghfgh 好评度 +1 - 2014-10-13
fghfghfgh 贡献值 +1 - 2014-10-13
fghfghfgh 威望 +1 - 2014-10-13
fghfghfgh 金钱 +10 - 2014-10-13
快速回复
限100 字节
 
上一个 下一个