usbcheckpopupdlg.cpp
770 Bytes
#include <QTimer>
#include "usbcheckpopupdlg.h"
#include "ui_usbcheckpopupdlg.h"
UsbCheckPopupDlg::UsbCheckPopupDlg(QWidget *parent) :
QDialog(parent),
ui(new Ui::UsbCheckPopupDlg)
{
ui->setupUi(this);
setAttribute(Qt::WA_DeleteOnClose);
setWindowFlags(Qt::Widget | Qt::FramelessWindowHint);
setAttribute(Qt::WA_NoSystemBackground);
setAttribute(Qt::WA_TranslucentBackground);
timer = new QTimer(this);
connect(timer,SIGNAL(timeout()),SLOT(usbCheckTimerFired()));
timer->start(500);
}
UsbCheckPopupDlg::~UsbCheckPopupDlg()
{
delete ui;
}
void UsbCheckPopupDlg::on_ctrBtnYes_clicked()
{
accept();
}
void UsbCheckPopupDlg::usbCheckTimerFired(){
bool usbDetect = false;
if(usbDetect){
accept();
}
}