Author Topic: Lib Qte-mt  (Read 4847 times)

Matthieu

  • Newbie
  • *
  • Posts: 13
    • View Profile
Lib Qte-mt
« on: April 04, 2005, 11:31:09 am »
Hi,

I want to try to cross-compile this library, in order to cross-compile my application that is using a thread.
Where is it possible to find the sources file ?

Thanks,
Matthieu

TimW

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
Lib Qte-mt
« Reply #1 on: April 04, 2005, 12:01:47 pm »
qte-mt is qte. They are the same library with the exception that support for multi-threading is built-in. I understand that you already have the sources for qte, well that means you have the sources for qte-mt.

The differnece is that you have to configure the library to support multithreading when you (cross) compile it. You can probably just edit config.h (IIRC undefine something like QT_NO_THREAD but you should be able to work it out) and recompile. But unless you replace the original libqte, and rebuild all the apps that depend on it (which is just about all the apps) I doubt that you will be able to run it on the zaurus which was your original intent.

You can have multiple thread in the qte that comes with the zaurus so long as only the main thread updates the gui. Are you sure that you need multiple threads? You may be able to simulate multiple threads using QTimer if you can't restrict gui updates to just one thread. That is what I do if I have some background processing to do (Trolltech even suggest using a QTimer with a zero timeout to do major background processing somewhere in the docs). (Found it) - see this bit:

Quote
myObject->processOneThing() will be called repeatedly and should return quickly (typically after processing one data item) so that Qt can deliver events to widgets and stop the timer as soon as it has done all its work. This is the traditional way of implementing heavy work in GUI applications; multi-threading is now becoming available on more and more platforms, and we expect that null events will eventually be replaced by threading.
« Last Edit: April 04, 2005, 12:04:36 pm by TimW »