33 #include <OgreRenderWindow.h> 36 #include <QApplication> 38 #include <QPaintEvent> 40 #include <QVBoxLayout> 41 #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) 50 , render_system_( render_system )
51 , render_window_( nullptr )
53 setAttribute(Qt::WA_OpaquePaintEvent,
true);
54 setAttribute(Qt::WA_PaintOnScreen,
true);
56 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 69 QVBoxLayout *mainLayout =
new QVBoxLayout;
70 mainLayout->setContentsMargins( 0, 0, 0, 0 );
72 this->setLayout(mainLayout);
75 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 80 QApplication::flush();
82 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 83 QApplication::syncX();
84 double pixel_ratio = 1.0;
86 QWindow* window = windowHandle();
87 double pixel_ratio = window ? window->devicePixelRatio() : 1.0;
105 QWidget::moveEvent(e);
Ogre::RenderWindow * makeRenderWindow(WindowIDType window_id, unsigned int width, unsigned int height, double pixel_ratio=1.0)
unsigned long WindowIDType