How center a QQuickView on screen without QtWidgets module? [SOLVED]
-
How i can center QQuickView without using QDesktopWidget hints or any QWidget based class?
-
Take a look at QScreen::size() and friends. Then use functions on QWindow to set it's geometry.
-
But in Qt 4.8 docs i see that:
The QScreen class is a base class for screen drivers in Qt for Embedded Linux.
Note that this class is only available in Qt for Embedded Linux.in Qt 5.0 docs i find that:
The QScreen class is used to query screen properties.
This class was introduced in QtGui 5.0.But i can't create object of this class because constructor need pointer to QPlatformScreen.
but in qpa/qplatformscreen.h :
//
// W A R N I N G
// -------------
//
// This file is part of the QPA API and is not meant to be used
// in applications. Usage of this API may make your code
// source and binary incompatible with future versions of Qt.
// -
-
Thank to ZapB and Lukas Geyer.