Unsolved Cannot setText() QLabel with QMediaPlayer on the Mainwindow
-
@mosleim said in Cannot setText() QLabel with QMediaPlayer on the Mainwindow:
this code is working in linux(Ubuntu 6.04). but, when i use in windows 7 and 10, my QLabel cannot updated.
Most likely you have a typing error in Ubuntu version. I guess you mean 16.04.
More important might be the Qt versions you are using on different platforms.
Unfortunately I have no experience with QMediapLayer. I could not see an obvious problem.
You can check also on JIRA for eventual bug reports.
-
Hi,
To add to @koahnig, what version of Qt are you using ?
Did you check the errors of video widget to see how thing are going around ?
-
My Qt version is Qt5.10. No warning or error triggerred.
-
Silly question but, what happens if you don't start the video playing rather than not set the video output on Windows ?
-
@SGaist the text still not updated.
I have clear and rebuild. But still not updated.
I create new project and copy paste the source, the label text can updated. ðŸ˜ðŸ˜ðŸ˜
-
May be a stupid question or comment. But did you rerun qmake in creator too?
-
Where's your QLabel located ?
-
-
It would be helpful if you post the content of the 'ui_mainwindow_1366x768.h' file.
-
Has anyone solved this problem? I encountered this problem too. If a QMediaPlayer is showup in a window, all control in that window won't show the updated UI. So if a QLabel has changed it's text content, you would 't see it. I suspect it has something to do with Media paint event. One (maybe) stupid way to workaround is use QMediaPlayer's unbind method to disconnect QVideoWidget with QMediaPlayer.