Results 1 to 4 of 4

Thread: Qt Widget Bug.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2011
    Posts
    5
    Platforms
    Unix/X11

    Default Qt Widget Bug.

    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:

    Qt Code:
    1. #include "MainWindow.h"
    2. #include "ui_MainWindow.h"
    3. #include "GLWidget.h"
    4.  
    5. MainWindow::MainWindow( QWidget *parent ) :
    6. QMainWindow( parent ),
    7. ui( new Ui::MainWindow ),
    8. display( new GLWidget )
    9. {
    10. ui->setupUi( this );
    11. //ui->gridLayout->addWidget( display );
    12. //resize( 640, 480 );
    13. installEventFilter( display );
    14. display->setWindowTitle( "OpenGL Cube Rendering Test" );
    15. display->glDraw();
    16. setCentralWidget( display );
    17. }
    18.  
    19. MainWindow::~MainWindow( void )
    20. {
    21. delete display;
    22. delete ui;
    23. }
    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?
    Last edited by litedrive; 21st January 2012 at 02:31.

Similar Threads

  1. Replies: 8
    Last Post: 28th June 2011, 14:57
  2. Replies: 1
    Last Post: 23rd June 2011, 23:09
  3. Replies: 10
    Last Post: 29th May 2010, 18:42
  4. Replies: 7
    Last Post: 14th January 2010, 08:47
  5. Replies: 4
    Last Post: 3rd March 2008, 22:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.