void Qvideomedia::on_pushButton_clicked()
{
QVideoWidget* vw = new QVideoWidget();
QMediaPlayer* mp = new QMediaPlayer(vw);
QString vidstring = QFileDialog::getOpenFileName(this, "Select video file", QDir::homePath());
mp->setMedia(QUrl::fromLocalFile(vidstring));
mp->setVideoOutput(vw);
vw->setGeometry(100, 100, 500, 500);
vw->show();
mp->play();
}
我有两个类,一个包含主窗口,另一个包含自己的窗口,每当我播放视频时,Qvideowiget都有自己的窗口,我想在第二个窗口中显示QVideowidget,但是我的所有效果都没有取得了丰硕的成果……预先感谢
答案 0 :(得分:0)
您应该使QVideowidget成为第二个窗口的子窗口。 看看这段代码,您刚刚在代码中添加了一行
<form>
Service fee :
<input type="text" value="300" name="invoiceValue" required>
<select name="taxType" required>
<option>Select Tax Type</option>
<option value='1'>CGST 9% AND SGST 9% on service fee</option>
<option value='2'>IGST 18% on service fee</option>
</select>
<input type="submit" name="submit">
</form>
<?php
$invoiceValue = $_POST['invoiceValue'];
$ctax= $_POST['taxType'];
$sql_query = '';
if($ctax == 1):
$cgst = ($invoiceValue*9)/100;
$sgst = ($invoiceValue*9)/100;
$sql_query= "INSERT INTO `VISAINVC` (cgst,sgst) VALUES ($cgst, $sgst);";
else if($ctax == 2):
$igst = ($invoiceValue*18)/100;
$sql_query= "INSERT INTO `VISAINVC` (igst) VALUES ($igst);";
endif;
?>