PDA

View Full Version : Tabwidget:it consist of only 1 tab and that tab has 4 video players!!! Help



Kethan Kumar
16th February 2012, 10:49
hi everybody,
I am doing a simple project.where i have added a Tab widget to a form :it consist only 1 tab and that tab has 4 video players!! I have added 4 frames and have changed the frame background color to yellow,further i have added those 4 video players into 4 frames (and proper layouts are added and so that video player fits into frame when the frame is resized) ....i want to know the mouse click events--- When a particular frame or video player is clicked with a mouse the frame color should turn blue and i must be able to full screen that particular video-player using double-click mouse event also again when double clicked the video player should appear normal,,it should retain the blue color until 1 more click is done on that video player..if 1 more click is done on the same frame -the color should turn yellow 1s again,can anybody help me!!!! its urgent

Spitfire
20th February 2012, 15:16
Are you looking for help doing it or someone who will do it for you?

Kumar Dmello
21st February 2012, 05:12
No sir i will do it myself. the positions where mouse click events ( Qpoint ) happens are known to me but which video player is clicked ;i want to know how to find it out.

ChrisW67
21st February 2012, 05:20
I don't see any ambiguity, the video player widget that receives the mouseDoubleClickEvent would be a fair bet.

Spitfire
21st February 2012, 09:04
Everything depends on from where you get your mouse position.
If it's a parent widget (tab) then you can use player->geometry().contains( click_pos ).
You could reimplement mouseDoubleClickEvent() and emit a signal there which would identify your player.
If it's like Chris said then you have no problem.

You could post some code to show your problem. I suspect that your design approach may not be that good.

Kumar Dmello
22nd February 2012, 10:16
Sir i am very new to Qt. I am trying to do a project which will display video from analog cameras.. No one is aware of Qt in my village; So what i should use to display video (streaming raw frames) from cameras;is it label or phonon video player?

Spitfire
22nd February 2012, 13:59
I've never used phonon but I'm guessing it's the way to go rather than display video stream in label.

Besides, you're not restricted to only your village :)
Ask clear questions and you'll get clear answers :)