16,816
社区成员




setAttribute(Qt::WA_TranslucentBackground, true);
setWindowFlags(Qt::FramelessWindowHint | Qt::Tool);
void Widget::on_Play_clicked()
{
if(playingfile.isEmpty())
{qDebug()<<"playingfile fialed";return;}
QStringList args;
args<<"-slave";
args<<"-quiet";
args<<"-wid "<<QString::number(ui->frame->winId()); //获取窗体ID;
args<<playingfile;
player_process=new QProcess(this);
connect(player_process,SIGNAL(readyReadStandardOutput()),this,SLOT(readFromStdout()));
player_process->setProcessChannelMode(QProcess::MergedChannels);
player_process->start("D:/mplayer_lite_r34577/mplayer/mplayer.exe",args);
if(!player_process->waitForStarted(2000))
QMessageBox::warning(this,"warning","Fialed!");
player_process->write("get_time_length\n");
}