PDA

View Full Version : Paint Engine



^NyAw^
20th January 2010, 11:48
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,

wysota
20th January 2010, 12:03
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.

^NyAw^
20th January 2010, 12:25
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,

wysota
21st January 2010, 01:10
Updating how? Using a thread? Can you provide some example code of what you mean?

^NyAw^
21st January 2010, 09:01
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,

wysota
21st January 2010, 09:10
Please provide the code reproducing the problem.

^NyAw^
21st January 2010, 09:37
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,

wysota
21st January 2010, 17:10
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.

^NyAw^
21st January 2010, 18:20
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,

wysota
22nd January 2010, 00:44
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 :)