hi, do you want to just inject or - like me - record and play events for testing and simulation purpose?
For recording you can override QApplication::eventFilter and store a copy of the event together with receiver name and class name. Later on you can play all recorded events by searching for your receiver in allWidgets() and just do a sendEvent(...). This will even work for moved/resized qt widgets, for the events are directly send to the widgets. But you must have put in a name for the objects. I'm on windows so the next levels are system hooks for recording and SendEvent or alike for sending events. Though i haven't tried this yet, i except them to be received from QApplication as "normal" user events, thus beeing forwarded as any other event, to a receiver who feels responsible for this event, e.g. a QLineEdit with focus or a QPushButton at the mouse position. Doing it this way, you'll surely not get the still-works-with-moved-resized feature, though. alex -- /* * BOFH excuse #24: * * network packets travelling uphill (use a carrier pigeon) */
signature.asc
Description: PGP signature
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest