Hello everyone,
Could someone please tell me if there is any way, I can get an application container screen size in Qt or Symbian c++? I need to get the size of the middle part of the phone screen, without the status pane where app name, battery status and signal status are and control pane where menu and exit buttons are.
At the moment I'm using the following to get control pane size and screen size:
I also tried the following method:Code:AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EApplicationWindow, aScreenRect); iScreenWidth = aScreenRect.Width(); iScreenHeight = aScreenRect.Height(); AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EControlPane, aScreenRect); cpanex = aScreenRect.Width(); cpaney = aScreenRect.Height();
I thought that avaiable geometry will tell me what I'm looking for. But availableGeometry always returns 0, 0 while screen geometry returns resolution of the entire screen.Code:QDesktopWidget* desktopWidget = QApplication::desktop(); QRect clientRect = desktopWidget->availableGeometry(); clientRect.getCoords ( &x1, &y1, &x2, &y2 ); QRect screenRect = desktopWidget->screenGeometry(); screenRect.getCoords ( &x1, &y1, &x2, &y2 );
Problem is, I don't know how to get the status pane size and without it I can't calculate the useful space for my app.
Someone please point me to the right direction because I really don't want to hardcode every screen size that needs to be supported. I need a Qt solution if possible, if not a carbide c++ code will work as well.
Thanks in advance.




