Hi,

I have an embedded 4.6.3 application that switches between a Qt stacked widget (a control interface) and a QDirectPainter ("runtime" interface). When the QDirectPainter rendering code is started, it requests the entire screen region for painting, otherwise it releases the screen for the stacked widget to render intro. The "runtime" interface starts with a button click event. I had intended to switch back to the control interface using any button click (or touch on a touchpad) in the screen, but I cannot figure out how to capture a button event while the QDirectPainter is running.

I have tried to derive from QDirectPainter and implement the event() method, but I don't seem to get any mouse events (see below), I've also tried to derive the event() from the QMainWindow class as well, but the minute I call setRegion() I lose all events. Can anyone point out a technique (or my error) to capture a button press event while QDirectPainter is controlling the screen?

Thanks.

-Mike

/* this code doesn't appear to get any events... */

class tcFBPainter : public QDirectPainter
{
public:
tcFBPainter(QObject* parent) : QDirectPainter(parent, QDirectPainter::Reserved)
{
}

virtual ~tcFBPainter() {}

bool event(QEvent* e)
{
printf("Saw Event\n");
return QDirectPainter::event(e);
}
};