Jump to content
  • Advertisement
Sign in to follow this  

how to use qt4 and irrlicht3d

This topic is 992 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i want to write a code for irrlicht begin scene in a qt4 window that have a button for exit i tried many times but every tim that's open two windows and i want only to run th scene and the button in one window my code

#include <QApplication>
#include <QLabel>
#include <irrlicht.h>
#include <QApplication>
#include <QPushButton>
using namespace irr;
using namespace core;
using namespace video;
int main(int argc, char *argv[])

IrrlichtDevice* device = createDevice(EDT_OPENGL,dimension2d<u32>(640, 480), 16,false, false, false, 0);
if (!device)
return 1;
IVideoDriver* driver = device->getVideoDriver();

QApplication app(argc, argv);
QPushButton *button = new QPushButton(QString( "Qt/Irrlicht" ));
QObject::connect(button, SIGNAL(clicked()),&app, SLOT(quit()));
while (device->run())

 driver->beginScene(true, true, SColor(255, 255, 255,255));


 return 0;


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!