33 #include <OgreRenderWindow.h> 36 #include <QApplication> 38 #include <QPaintEvent> 40 #include <QVBoxLayout> 41 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) 48 : QWidget(parent), render_system_(render_system), render_window_(nullptr)
50 setAttribute(Qt::WA_OpaquePaintEvent,
true);
51 setAttribute(Qt::WA_PaintOnScreen,
true);
53 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 66 QVBoxLayout* mainLayout =
new QVBoxLayout;
67 mainLayout->setContentsMargins(0, 0, 0, 0);
69 this->setLayout(mainLayout);
72 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 94 QWidget::moveEvent(e);
120 const int w = width() * ratio;
128 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 131 QWindow* window = windowHandle();
132 return window ? window->devicePixelRatio() : 1.0;
Ogre::RenderWindow * makeRenderWindow(WindowIDType window_id, unsigned int width, unsigned int height, double pixel_ratio=1.0)
unsigned long WindowIDType