PDA

View Full Version : Problem scalng the Screen size



baluk
23rd November 2010, 15:21
Hi,

I have an issue with scaling screen height and width to display my app on the desktop in full screen mode. I am using QDesktopWidget to scale the screen height and width and set these values to the mainwindow. But while displaying, my app starts somewhere randomly on the screen and half of the part goes beyond the screen. Do I have to use any extra parameters. My code is


int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
QDesktopWidget *desktop = QApplication::desktop();
int screenWidth = desktop->width();
int screenHeight = desktop->height();
w.setFixedSize(screenWidth,screenHeight);
w.show();
return a.exec();
}


Any suggestions would be helpful.

Thank You,

Baluk

high_flyer
23rd November 2010, 15:38
Try w.move(0,0);

baluk
23rd November 2010, 15:50
Yes it works fine now. Thanks high_flyer.