| The Following User Says Thank You to DavyP For This Useful Post: | ||
| The Following User Says Thank You to DavyP For This Useful Post: | ||
| The Following 2 Users Say Thank You to DavyP For This Useful Post: | ||
setAttribute(Qt::WA_Maemo5AutoOrientation, true);
connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(orientationChanged()));
QRect screenGeometry = QApplication::desktop()->screenGeometry();
setUpdatesEnabled(false);
if (screenGeometry.width() > screenGeometry.height())
{
/* Do landscape stuff */
}
else
{
/* Do portrait stuff */
}
setUpdatesEnabled(true);
| The Following 3 Users Say Thank You to freemangordon For This Useful Post: | ||
setAttribute(Qt::WA_Maemo5AutoOrientation, true);
connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(orientationChanged()));
QRect screenGeometry = QApplication::desktop()->screenGeometry();
setUpdatesEnabled(false);
if (screenGeometry.width() > screenGeometry.height())
{
/* Do landscape stuff */
}
else
{
/* Do portrait stuff */
}
setUpdatesEnabled(true);
| The Following 2 Users Say Thank You to DavyP For This Useful Post: | ||
| The Following 2 Users Say Thank You to freemangordon For This Useful Post: | ||