Hi,
My code is....
ui(new Ui::Widget)
{
setWindowFlags(Qt::FramelessWindowHint);
ui->setupUi(this);
}
Widget::~Widget()
{
delete ui;
}
void Widget::on_pushButton_2_clicked()
{
this->close();
}
void Widget::on_pushButton_clicked()
{
msgBox.setText("display a message");
msgBox.setStyleSheet("background:cyan");
msgBox.exec();
QString prg
="/usr/bin/Gnome-Selfdiag";
arguments << "-platform" << "xcb";
// myproc->start(prg,arguments);
// myproc->waitForFinished();
myproc->execute(prg,arguments);
// system("/usr/bin/Gnome-Selfdiag -platform xcb ");
}
Widget::Widget(QWidget *parent) :
QWidget(parent),
ui(new Ui::Widget)
{
setWindowFlags(Qt::FramelessWindowHint);
ui->setupUi(this);
}
Widget::~Widget()
{
delete ui;
}
void Widget::on_pushButton_2_clicked()
{
this->close();
}
void Widget::on_pushButton_clicked()
{
QMessageBox msgBox(this);
msgBox.setText("display a message");
msgBox.setStyleSheet("background:cyan");
msgBox.exec();
QString prg="/usr/bin/Gnome-Selfdiag";
QStringList arguments;
arguments << "-platform" << "xcb";
QProcess *myproc = new QProcess(this);
// myproc->start(prg,arguments);
// myproc->waitForFinished();
myproc->execute(prg,arguments);
// system("/usr/bin/Gnome-Selfdiag -platform xcb ");
}
To copy to clipboard, switch view to plain text mode
Bookmarks