Results 1 to 2 of 2

Thread: Qt + SDL problem

  1. #1
    Join Date
    Jan 2006
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Angry Qt + SDL problem

    Hi,
    I'm writting a 3d editor with real time animation capabilities. For programming the interface I decided to use Qt to make everithing as much portable as possible and for real time performance SDL is right because the control you have on timers/main loop.
    The porblem I'm having is related to the event processing in Qt and SDL. I made a button toolbar in Qt which just initilizes SDL and enters in a loop painting in a window. The animation goes well but suddenly, SDL just stops processing events or painting the window. I think this is happening because of the event/main loop fight between SDL and Qt. Is t possible to stop the QApplication event processing for a while and "reconect" it later without exiting or quitting the whole thing?

    thanks in advance

    Aldo

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt + SDL problem

    QApplication only processes events, when the application is not doing anything else (meaning that the control returns to QApplication::exec() ), so if you want it to stop processing events while doing something else -- just do it, events won't be processed.

    Did you think about using QGLWidget instead of SDL here? SDL uses OpenGL for 3D plotting anyway, so it may be faster and easier to use OpenGL directly through QGLWidget.

Similar Threads

  1. Very strange socket programming problem
    By montylee in forum Qt Programming
    Replies: 5
    Last Post: 11th November 2008, 12:05
  2. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 09:12
  3. Steps in solving a programming problem?
    By triperzonak in forum General Programming
    Replies: 8
    Last Post: 5th August 2008, 08:47
  4. problem with paint and erase in frame
    By M.A.M in forum Qt Programming
    Replies: 9
    Last Post: 4th May 2008, 20:17
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.