November 10, 2010

Polto Polto
Lab Rat
21 posts

[solved]QEvent , is it Possible to handle it in console application with no QObject?

  is it Possible to handle QEvent in console application with no QObject? ex: a console application get the key press or mouse keys event or the event must handle in QObject class
 Signature 

Polto

3 replies

November 10, 2010

Franzk Franzk
Lab Rat
830 posts

No. QEvents are delivered by QApplication to QObjects. See Events and Filters [doc.trolltech.com].

 Signature 

“Horse sense is the thing a horse has which keeps it from betting on people.”—W.C. Fields

http://www.catb.org/~esr/faqs/smart-questions.html

November 10, 2010

Polto Polto
Lab Rat
21 posts

thanks ,
these all functions the QObject is main parameter in it
but I ask to be sure
bool QCoreApplication::notify ( QObject * receiver, QEvent * event )
void QCoreApplication::postEvent ( QObject * receiver, QEvent * event )
void QCoreApplication::postEvent ( QObject * receiver, QEvent * event, int priority )
thanks again

 Signature 

Polto

November 10, 2010

Franzk Franzk
Lab Rat
830 posts

No problem.

 Signature 

“Horse sense is the thing a horse has which keeps it from betting on people.”—W.C. Fields

http://www.catb.org/~esr/faqs/smart-questions.html

 
  ‹‹ QString and Microsoft STL std::string crash // Visual Studio 2010 // 64 bit      [Solved] Weird Qt Trojan Error ››

You must log in to post a reply. Not a member yet? Register here!