Center a Window on the Screen/ko

From Qt Wiki
< Center a Window on the Screen
Revision as of 15:58, 16 March 2015 by AutoSpider (talk | contribs) (AutoSpider moved page Center a Window on the Screen Korean to Center a Window on the Screen/ko: Localisation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
EnglishБългарски한글판

윈도우를 스크린 중앙에 위치하도록 만드는 방법

  1. include <QStyle>
  2. include <QDesktopWidget>

window->setGeometry(

QStyle::alignedRect(
Qt::LeftToRight,
Qt::AlignCenter,
window->size(),
qApp->desktop()->availableGeometry()
));

forum thread 에서 도와준 페페Peppe 에게 감사