0

I can't seem to find any place where it is described how i can get the display width and height, using nokia sdk and QT.

I need to resize my GUI when i have detected the screensize.

Or do anyone else have a better solution?

Thanks in advance

Ikky
  • 2,826
  • 14
  • 47
  • 68

1 Answers1

1

You can find out the display size with QDesktopWidget::availableGeometry.

Stephen Chu
  • 12,724
  • 1
  • 35
  • 46
  • it's probably right, but when i try this at my main window: "ui->setupUi(this); QRect screenSize = QDesktopWidget::availableGeometry(*parent);" i get "cannot call memeber function 'const QRect QDesktopWidget::availableGeometry(const QWidget*) const' without object – Ikky Mar 01 '11 at 15:29
  • It's not a static function. You need to get an instance by calling QApplication::desktop() http://doc.trolltech.com/latest/qapplication.html#desktop – Stephen Chu Mar 01 '11 at 16:58