{
dialog= this;
this->setGeometry(0, 0, 400, 100);
win->setGeometry(0, 0, this->width(), this->height());
label
= new QLabel("File gets deleted permanently.\n Do you wish to continue");
label->setText("<font color=#000000>"+label->text()+"</font>" );
grid->addWidget(label, 0, 0, Qt::AlignCenter);
grid->addWidget(button1, 1, 0, Qt::AlignLeft);
grid->addWidget(button2, 1, 1, Qt::AlignRight);
win->setLayout(grid);
}
dialog::dialog(QWidget* parent): QWidget(parent)
{
dialog= this;
win= new QWidget(dialog);
this->setGeometry(0, 0, 400, 100);
win->setGeometry(0, 0, this->width(), this->height());
grid= new QGridLayout;
label= new QLabel("File gets deleted permanently.\n Do you wish to continue");
label->setText("<font color=#000000>"+label->text()+"</font>" );
button1= new QPushButton("OK");
button2= new QPushButton("CANCEL");
grid->addWidget(label, 0, 0, Qt::AlignCenter);
grid->addWidget(button1, 1, 0, Qt::AlignLeft);
grid->addWidget(button2, 1, 1, Qt::AlignRight);
win->setLayout(grid);
}
To copy to clipboard, switch view to plain text mode
dilogbox= new dialog(QApplication::activeWindow());
To copy to clipboard, switch view to plain text mode
QApplication::activeWindow()->installEventFilter(dilogbox);
To copy to clipboard, switch view to plain text mode
Bookmarks