On quinta-feira, 5 de setembro de 2013 10:43:31, Phil Hannent wrote: > Good morning, > > I am trying to implement my own event loop. I am trying to use > libpurple which uses glib with a Qt application I am developing [1]. > On Linux the application runs fine. On windows the application is > unstable and will freeze. Working on the assumption that the Windows > version of Qt is not using the glib eventloop I set about > re-implementing the event loop using the QAbstractEventDispatcher.
Your assumption is correct. We don't use glib on Windows. We don't even search for it. > 2, There is a lack of good examples regarding Qt and 3rd party glib > implementations for which I believe the class was designed for. There are less than 10 people in the world that need to implement event dispatchers, including the people who wrote the ones in Qt. That's why it's not very documented: too much effort for too little gain. It's best just to read the code for the existing glib and Windows dispatchers and ask questions here and in dev@. We'll do what we can to help. > I was ploughing ahead with it anyway on the basis that it would be a > good exercise, however I am getting lost. Such as the registerTimer > function [2], where is the timerId value from? I am using my own Id's > so could I clash? > [2] > http://harmattan-dev.nokia.com/docs/library/html/qt4/qabstracteventdispatch > er.html#registerTimer-2 Updated links: http://qt-project.org/doc/qt-5.1/qtcore/qabstracteventdispatcher.html#registerTimer-4 http://qt-project.org/doc/qt-4.8/qabstracteventdispatcher.html#registerTimer-2 The ID is allocated by the non-virtual overload, which then calls the virtual one. That is, QObject::startTimer calls this function: int QAbstractEventDispatcher::registerTimer(int interval, Qt::TimerType timerType, QObject *object) { int id = QAbstractEventDispatcherPrivate::allocateTimerId(); registerTimer(id, interval, timerType, object); return id; } [Qt 5 code; in Qt 4, there's no timer type] -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest