[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: synchronization problem in libkhtml while doing a form submit
From:       Zack Rusin <zack () kde ! org>
Date:       2004-07-08 12:41:00
Message-ID: 200407080841.02101.zack () kde ! org
[Download RAW message or body]

On Tuesday 06 July 2004 12:01, Yarram Sunil Kumar wrote:
> I am writing an application that embeds libkhtml. In this application
> i am trying to capture the form submit data after fetching the page.
>
>   I wanted to this  synchronously, first fetch the page and then do
> the form submit and i dont want to do this in any slot.  I am using
> QWaitCondition object for synchronization.  For this i have written
> openURL slot,  formSubmit slot and documetComplete slot. Also running
> the kapplication eventloop in separate worker thread (if i run it as
> main thread i cannot do form submit after getting the page)
>
> i got the following error:-
> Very strange! got a DCOPReply opcode, but we were not waiting for a
> reply!

"In Qt, one thread is always the GUI or event thread. This is the thread 
that creates a QApplication object and calls QApplication::exec(). This 
is also the initial thread that calls main() at program start. This 
thread is the only thread that is allowed to perform GUI operations, 
including generating and receiving events from the window system. Qt 
does not support creating QApplication and running the event loop (with 
QApplication::exec()) in a secondary thread. You must create the 
QApplication object and call QApplication::exec() from the main() 
function in your program.". You try to exec in a different thread. I'm 
afraid that you'll have to reread both Qt and KDE documentation if you 
want to get it working.

Zack

-- 
As long as there are tests, there will be prayer in public schools.
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic