Hello all,

This is supposed to grab a section of the parent widget when this widget is moved and display the grab. It isn't working.
Any insights will be greatly appreciated!!!

TIA,

gonzoboy!

void ZoomWindow::moveFrame()
{
move(mp.x(), mp.y());

QWidget w(this->parentWidget());
w.show();
// grab a 40x40 chunk of parent widget
pm = QPixmap::grabWidget(&w, 0, 0, 39, 39);
}

void ZoomWindow:aintEvent(QPaintEvent* pe)
{
QPainter painter(this);
QRect r(0, 0, 199, 199);
QPen pen(Qt::black);

// paint the pixmap from parent zoomed 5x in ZoomWindow
painter.drawPixmap(r, pm);
painter.drawRect(r);

}