[Interest] Best choice for android/iOS/Windows/Mac
Muhammad Bashir Al-Noimi
mbnoimi at gmail.com
Wed Sep 4 23:45:08 CEST 2013
On 09/04/2013 04:44 PM, Phil Hannent wrote:
> http://stackoverflow.com/questions/12645880/fullscreen-for-qdialog-from-within-mainwindow-only-working-sometimes
>
> QDialog* d = new QDialog();
> d->setModal(false);
> d->show();
>
> const QString session = QString(getenv("DESKTOP_SESSION")).toLower();
> QByteArray geometry;
> if (session == "ubuntu") {
> geometry = _d->saveGeometry();
> d->setFixedSize(qApp->desktop()->size());
> d->setWindowFlags(Qt::FramelessWindowHint);
> d->setWindowState( d->windowState() | Qt::WindowFullScreen);
> d->show();
> d->activateWindow();
> } else {
> d->showFullScreen();
> }
>
> Perhaps you need to be setting a frameless window flag would help?
Thanks a lot for the suggestion :)
getenv() replaced with qgetenv() but I couldn't find any reference
points to the available vars in qgetenv()!
Any way, I tried to use the following instead but it didn't fix the
issue and my dialog still appears borderless but not full screen and not
modal too!!!
#if !defined(Q_OS_ANDROID)
d->showFullScreen();
#else
geometry = d->saveGeometry();
d->setFixedSize(qApp->desktop()->size());
d->setWindowFlags(Qt::FramelessWindowHint);
d->setWindowState( d->windowState() | Qt::WindowFullScreen);
d->show();
d->activateWindow();
#endif
--
Best Regards,
Muhammad Bashir Al-Noimi
More information about the Interest
mailing list