Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Getting DirectX or any other rendering API to update in real time in a widget...
ProgrammerAtHeart3344 last edited by
OK, I know i prob asked this a million times but I can't get anything other then the OpenGL (which is native to Qt), to update in real time. For example, here is a screen shoot from my shader editor im trying to make.!http://i1069.photobucket.com/albums/u466/eggman3344/output.png(http://i1069.photobucket.com/albums/u466/eggman3344/output.png)!
as you can see, DirectX is created right and also the shader creation works pretty well the only reason there's an error was to show that the editor so far worked right just the pre-view window wont update as usually is with my luck sigh;
anyways here is the code for my render window.
RenderWindow::RenderWindow(QWidget* parent /* = 0 */)
renderer = new Renderer(this->winId());
oldTimer = new QTimer(this,"Old Timer");
newTimer = new QTimer(this,"New Timer");
WId win = renderer->getWindowHandle();
void RenderWindow::paintEvent(QPaintEvent *pE)
if (framesPerSec >= 60)
newTimer = oldTimer;
int newFrame = newTimer->interval();
newTimer += (int)framesPerSec;
void RenderWindow::resizeEvent(QResizeEvent *rE)
void RenderWindow::enterEvent(QEvent *Ee)
as you can see, it's kinda crap but as long as it creates Direct3D and compiles the shader, i don't care for now, i just want something that will allow me to be able to use as a way to update the widget in real time like in Unreal Ed and Ogitor (also since im trying to make my own Oger powered editor being able to update in real time will help tremendesly (probobably spelled that wrong).