Good morning, I am attempting to use a Glib based library with Qt, it works perfectly on Linux but on windows the application locks up.
I have gotten as far as realising that I need to use the QAbstractEventDispatcher, that the qeventdispatcher_glib.cpp and qeventdispatcher_win.cpp provide good examples. It seems to me however that I need most of qeventdispatcher_glib.cpp and just to insert the calls required for my library to interact with the system. Is that a fair statement or would that be overkill for reimplementing my own QEventDispatcher? Regards Phil Hannent ---------- Forwarded message ---------- From: Thiago Macieira <thiago.macie...@intel.com> Date: 5 September 2013 16:30 Subject: Re: [Interest] QAbstractEventDispatcher To: inter...@qt-project.org 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 _______________________________________________ Interest mailing list inter...@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
signature.asc
Description: PGP signature
_______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development