Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QWebView problem with flash
TuBylem last edited by
I had written a music player application in C# and I have decided to rewrite it in QT, but I have a huge problem with QWebView (which is similar to WebBrowser in C#). My application uses a flash player from the website.
WebBrowser's (C#) WebBrowserProgressChangedEvent sends to me the signal (-1), when the flash player has just finished his job, but QWebView doesn't. In this application I have to know when a current track is finished, to start the next one, so please help me.
How can I solve this problem?
I have attached print screens from both applications (they say how WebBrowserProgressChangedEvent (from C#) and loadProgress(int) (from QT) signals are changing) and source code.
class MainWindow : public QWidget
explicit MainWindow(QWidget *parent = 0);
void setupUi(QWidget *MainWindow);
void progressChanged(int progress);
#endif // MAINWINDOW_H@
MainWindow::MainWindow(QWidget *parent) : QWidget(parent)
connect(webView, SIGNAL(loadProgress(int)), this, SLOT(progressChanged(int)));
void MainWindow::progressChanged(int progress)
void MainWindow::setupUi(QWidget *widget)
webView = new QWebView(widget);
listWidget = new QListWidget(widget); verticalLayout = new QVBoxLayout(widget); verticalLayout->addWidget(webView); verticalLayout->addWidget(listWidget); widget->setLayout(verticalLayout);
benjamin.poulain last edited by
bq. WebBrowser’s (C#) WebBrowserProgressChangedEvent sends to me the signal (-1), when the flash player has just finished his job
How does that work? You receive the event when the content has finished playing? or finished loading? I guess you could subclass QNetworkAccessManager and wait for all request to be finished.