Qt, play video by Winid blink when lost/get focus - qt

i wrote QtVsPlayer to play "special" video from Hikvision security cameras, their sdk use winid of a widget to display the stream.
All sound like ok, but when the widget i use get or lose focus, video blink.
In other side, i made in QtVsPlayer a RTSP player, i used QtMuldimedia player, this one don't have the blink problem.
In Qt widget or main window or qtscrollarea there is some property to set for that?
I think it will be complicated to provide a code snipet and so i'm sorry to link only the full program code :
https://github.com/surfzoid/QtVsPlayer

Related

Is there a way to pause the Media Object when a Suggestion Chip has been clicked - while the Media Object is playing?

I have an audio clip that pays when a specific intent has been triggered. A set of suggestion chips are displayed along with it. Now when I test it out in the simulator or my phone the MediaObject works fine but if I continue to the next intent using a suggestion chip the MediaObject doesn't pause automatically. Which in-turn overlaps with the next intents SSML.
I'm unable to get a sample code or any reference on how to pause MediaObject audio.
I've tried adding a blank audio clip in an SSML before the next intent starts, so to auto cancel the MediaObject, which failed.
I expect that when the user clicks on a Suggestion Chip while a MediaObject is playing - the Audio clip must pause automatically. And it should not overlap with the next intents SSML.
We were able to reproduce the issue and have filed an internal bug.
There isn't an API to pause the music.

display Qprocess output window inside the QT mainwindow

how to display Qprocess output window inside the QT mainwindow? I am calling ffplay by Qprocess. the video playing in a detached window? how would i play the video in same application QTwindow
I don't know ffplay but it seems that ffplay is opening the window by itself. One approach is that you could try to get the current image and display that in your mainwindow. Every time a new image is available you have to replace the image in your ui with the new one. Of course you have to keep synchronization in mind, since this application is not single-threaded.
In general your approach looks not right. You shouldn't call a program to do that kind of task. Normally you use a library for that.
You should have a look at this example to get an idea what I'm talking about: https://doc.qt.io/qt-5/qtwidgets-widgets-movie-example.html

How do you register an event listener to the appear/disappear events of the virtual keyboard on Blackberry Playbook using Flex?

Not why no one has been complaining about this but I'm have a lot of problems with the Blackberry Playbook Virtual Keyboard on the Simulator.
I have an richedit component in the middle of the screen and as soon as the virtual keyboard appears to enter text, it completely hides the text input. I'd like to move the text input up when the keyboard appears/disappears. Is there any way to do this? I don't want to muck around with the focus_in and focus_out events on the richedit. I've tried, and it's not very reliable.
Thank you in advance!
We expect the next release of the SDK (long overdue at this point but, I think, imminent) to provide much more complete support for the virtual keyboard. Until that occurs, I think it's a waste of time to attempt to do anything special with it.
I also think there's a chance it will automagically move your whole stage up when it would cover up a text input, so maybe you won't have to do anything about it anyway.
Edit: Actually I published code in January describing an undocumented way to support this, using some rudimentary PPS support. It also shows how you can programmatically control the keyboard opening and closing. I don't recommend it yet for real code...

Bring a window to the front in Maemo

I've got a Maemo (Qt) app that does some integration with the built-in media player via D-Bus. All the control functionality I need is complete, but I've got a requirement to show my application window (which gets backgrounded when playback starts) instead of the media player when the playback window is closed (it's a stacked window).
It should go like this: user clicks item in my Qt application, which launches the media file in the native media player. User watches media file, exits by clicking the arrow on the playback window. I'd like to somehow catch this event and bring my application to the front instead of showing the media player's main window.
Is it even possible on Maemo? I'm thinking that some low-level X coding might be required.
Answer was painfully obvious, I can catch a state_changed signal from D-Bus- state=0 when the window is closed.
You can also use the raise() method of Qt windows.

Virtual keyboard for QtWebKit based browser or how can I get the currently focused text field?

I'm working on implementing a virtual keyboard for a QtWebKit based browser. I'm having a lot of difficulty understanding how QtWebKit paints the controls within the actual page. Initially I thought they were QLineEdit instances, but they are not. Diving into implementation it appears that the glue code between Qt and WebKit paints the text field using QStyle and QPainter. Unfortunately, I'm very new to Qt and so I dont understand where in the event loop the mouse presses for these events are interpreted. I found Editor::canEdit() deep in the call stack, and now I can bring up the virtual keyboard when the user clicks on a text field within the page. The virtual keyboard then expected a pointer to a QWidget instance, but Edito::canEdit() doesn't carry that information and I can't find anywhere where a QWidget like instance is exposed. I'm really stumped, any advice would be most welcome.
Thanks!
You might get better luck by hooking the virtual keyboard into the Qt input method system. Search for "InputMethod" in the source code of QtWebKit Api, i.e. the qweb*.* files.

Resources