Sorry... It's not a bug... It's my mistake... -----Original Message----- From: igor.mironc...@gmail.com Sent: Monday, June 09, 2014 1:37 AM To: Thiago Macieira ; interest@qt-project.org Subject: Re: [Interest] How to start object in the thread?
Actually Thiago it's my event. It's looks like a bug. When I changed static const int changeColorEventType = QEvent::registerEventType(); to static const int changeColorEventType = 2000; all works fine. P.S. In my test app I have only one custom event... -----Original Message----- From: Thiago Macieira Sent: Monday, June 09, 2014 12:24 AM To: interest@qt-project.org Subject: Re: [Interest] How to start object in the thread? Em seg 09 jun 2014, às 00:10:33, igor.mironc...@gmail.com escreveu: > Thanks guys for your replies. > > I've found the problem. The problem was in Object's event() method... > > But now I have another problem. > > In my test app I have custom event that I post with > QCoreApplication::postEvent(). > > All seems ok, events posted and received but with another type that I > expect. > > static const int changeColorEventType = QEvent::registerEventType(); > > class ChangeColorEvent > > : public QEvent > > { > public: > ChangeColorEvent() > > : QEvent( static_cast< QEvent::Type >( changeColorEventType ) ) > > { > } > }; > > Is this code right? Yes. > In my Object's event() I receive events with type 65533 when > changeColorEventType is 65535... That's another event, not yours. Don't handle it, just pass to QObject's handler. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest