I think you need to use a blocking direct connection, although be aware that the slot will be executed in the MainWindow's thread:
connect(this, SIGNAL(PenOn(QPoint)), &d, SLOT(on_PenOn(QPoint)), Qt::BlockingQueuedConnection);
See http://qt.nokia.com/doc/4.5/qt.html#ConnectionType-enum for more info.
The problem with using the default Qt::ConnectionType for the connect method is that since the objects are in different threads, the slot will not be called until the dialog thread gets back to it's main loop, which will only happen after the d.exec() loop is finished.