
Originally Posted by
high_flyer
@Mahe2310
Could you explain why it is you need an infinite loop in a costructor?
I am sure if you explain what it is you want to acheive it can be done in a better way.
Hi High_Flyer,
Myself want to handle the qtopia key events and some message queue events simultaneously.
I mean, handle them always. So I thought of going for an infinite loop which check for a qt event first and then message event.
Is it possible to call the MyWidget::event(QEvent*)?
I will show how the loop should look like...
while(1)
{
if(true == event
(QEvent *evt
) ) /* keyEvent detected */ {
MyEventHandler(event);
}
if( /* Messgae at Queue */ )
{
/* Handle the Message */
}
}
while(1)
{
if(true == event(QEvent *evt) ) /* keyEvent detected */
{
MyEventHandler(event);
}
if( /* Messgae at Queue */ )
{
/* Handle the Message */
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks