19 m_plbl =
new QLabel();
21 QPushButton* pcmd =
new QPushButton(
"Capture Screen");
25 QVBoxLayout* pvbxLayout =
new QVBoxLayout;
26 pvbxLayout->addWidget(pcmd);
27 pvbxLayout->addWidget(m_plbl);
28 setLayout(pvbxLayout);
34 QDesktopWidget* pwgt = QApplication::desktop();
35 QPixmap pic = QPixmap::grabWindow(pwgt->screen()->winId());
37 m_plbl->setPixmap(pic.scaled(m_plbl->size()));