I've been having a strange bug happen in my program, lately. It's been this way for about an hour now, and I'm not quite sure what to do about it.
First off, I'll post the code which is relevant to what may (or may not) be causing this:
#include "MainWindow.h"
#include "ui_MainWindow.h"
#include "GLWidget.h"
MainWindow
::MainWindow( QWidget *parent
) : ui( new Ui::MainWindow ),
display( new GLWidget )
{
ui->setupUi( this );
//ui->gridLayout->addWidget( display );
//resize( 640, 480 );
installEventFilter( display );
display->setWindowTitle( "OpenGL Cube Rendering Test" );
display->glDraw();
setCentralWidget( display );
}
MainWindow::~MainWindow( void )
{
delete display;
delete ui;
}
#include "MainWindow.h"
#include "ui_MainWindow.h"
#include "GLWidget.h"
MainWindow::MainWindow( QWidget *parent ) :
QMainWindow( parent ),
ui( new Ui::MainWindow ),
display( new GLWidget )
{
ui->setupUi( this );
//ui->gridLayout->addWidget( display );
//resize( 640, 480 );
installEventFilter( display );
display->setWindowTitle( "OpenGL Cube Rendering Test" );
display->glDraw();
setCentralWidget( display );
}
MainWindow::~MainWindow( void )
{
delete display;
delete ui;
}
To copy to clipboard, switch view to plain text mode
The bug is strange, for it resembles the following image:

Uploaded with ImageShack.us
I have no idea what could be causing this; I've tried restarting my pc to see if that would help, but unfortunately it doesn't. Does anyone have any idea as to what the problem might be?
I can post more code too, if necessary.
Edit:
Realized I posted the wrong image. Sorry.
Description
The bug basically, for some reason, captures whatever lies behind the window and projects it onto the window itself. Is this common for any reason?
Bookmarks