Results 1 to 10 of 10

Thread: Paint Engine

  1. #1
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Paint Engine

    Hi,

    As I can see on the Qt sources, there is a Direct3D paint engine. How can I use it? Have I to recompile all Qt libs?

    Thanks,
    Òscar Llarch i Galán

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

    Default Re: Paint Engine

    Direct3D paint engine is not supported since 4.6.0. You probably wouldn't need it anyway. For earlier version you need to rebuild Qt with -direct3d switch but as I said, there is a 95% chance you don't need it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Paint Engine

    Hi,

    I just found that updating a QLabel with a text too many fast is crashing the application on "QRasterPaintEngine::drawImage" method. Just wanted to change the paint engine to see if there is any difference.
    Anyway, do you know that if updating the QLabel too fast can be dangerous? Commenting the line that changes the text on the application it never crash.

    Thanks,
    Òscar Llarch i Galán

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

    Default Re: Paint Engine

    Updating how? Using a thread? Can you provide some example code of what you mean?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Paint Engine

    Hi,

    I'm using a Thread that emits a lot of signals per second with a int value that have to be displayed into a QLabel. I don't really know if this is the problem that makes the application crash but it seems to work commenting the line that updates the QLabel.

    Thanks,
    Òscar Llarch i Galán

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

    Default Re: Paint Engine

    Please provide the code reproducing the problem.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Paint Engine

    Hi,

    Please provide the code reproducing the problem.
    Note that it is impossible. It depends on 3rd party libs and it's also closed source because it belogns to the company where I work.

    Don't worry about it, I will debug the application deeply.

    Thanks,
    Òscar Llarch i Galán

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

    Default Re: Paint Engine

    I don't want the code of your program. I want you to write (from scratch) a short program (30 lines of code max) that will contain only the code necessary to reproduce the problem. Writing such a test case is very often enough to pinpoint and fix the problem on your own.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #9
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Paint Engine

    Hi,

    Thanks Wysota,

    It seems to not be the QLabel update to produce the crash. The problem in other pice of code that I'm searching for. Commenting some lines of my code it seems to not crash so now I need to find, into a lot of code, where I'm doing something wrong.

    I've tryied to update a QLabel with a signal emmited from a thread in a little test and it works perfectly.

    Thanks,
    Òscar Llarch i Galán

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

    Default Re: Paint Engine

    Quote Originally Posted by ^NyAw^ View Post
    I've tryied to update a QLabel with a signal emmited from a thread in a little test and it works perfectly.
    That test proves nothing really (the fact it didn't crash when you tested it doesn't mean it won't crash at all). But I can tell you this is correct - as long as you use signals and slots and thread affinity of objects involved is correct, it will work properly
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Drawing standard widgets using a custom paint engine
    By Waywocket in forum Qt Programming
    Replies: 26
    Last Post: 21st October 2010, 20:40
  2. Can you specify a file engine?
    By skimber in forum Qt Programming
    Replies: 2
    Last Post: 18th September 2008, 15:54
  3. paint device returned engine == 0, type: 3
    By MarkoSan in forum Qt Programming
    Replies: 14
    Last Post: 12th December 2007, 10:42
  4. cairo4qt 0.9 - a cairo based paint engine for Qt4
    By dragchan in forum Qt-based Software
    Replies: 0
    Last Post: 18th May 2007, 05:07
  5. Using QGLWidget paint engine to draw regular widgtes?
    By high_flyer in forum Qt Programming
    Replies: 11
    Last Post: 9th October 2006, 12:06

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.