Window::Window() { setWindowTitle(tr("Elvis")); QGridLayout *mainLayout = new QGridLayout; menuBar = new QMenuBar(); glArea = new GLWidget(); setupMenus(); createActions(); createLeftBar(); createBottomBar(); mainLayout->setMenuBar(menuBar); mainLayout->addWidget(leftBar, 1, 0); mainLayout->addWidget(glArea, 1, 1); mainLayout->addWidget(bottomBar, 2, 0, 1, 2); mainLayout->setRowStretch(1, 1); mainLayout->setRowStretch(2, 0); mostrarAcoesObjeto(true); setLayout(mainLayout); glArea->installEventFilter(this); }
// on "init" you need to initialize your instance bool BattleScene::init() { log("BattleScene::init()"); if ( !Scene::init() ) { return false; } initBattleData(); createUI(); createBottomBar(); return true; }