Results 1 to 10 of 10

Thread: [Qt Widget + libvlc] catching mouse events

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2011
    Posts
    354
    Thanks
    17
    Thanked 27 Times in 24 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: [Qt Widget + libvlc] catching mouse events

    As far as I know, there are no such functions in libvlc as libvlc_set_key_input or libvlc_set_mouse_input. If you meant libvlc_video_set_key_input and libvlc_video_set_mouse_input, yes, I've tried it as I wrote in the original post. These functions control whether vlc should handle mouse events, but I don't want to disable it, because then DVD menu won't work. I just need to add some custom processing, so I could show a menu on right click.

    Regarding the second idea, maybe I misunderstand something, but it seems like disabling QFrame doesn't affect anything when video is played inside the frame and mouse handling is enabled for libvlc.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: [Qt Widget + libvlc] catching mouse events

    As far as I know, there are no such functions in libvlc as libvlc_set_key_input or libvlc_set_mouse_input. If you meant libvlc_video_set_key_input and libvlc_video_set_mouse_input, yes, I've tried it as I wrote in the original post.
    I didn't mean either (as I am not a vlc user and don't know its API) - I just quoted the post from the link you posted - its probably a version issue, and I guess the methods you are using are the correct ones.

    Regarding the second idea, maybe I misunderstand something, but it seems like disabling QFrame doesn't affect anything when video is played inside the frame and mouse handling is enabled for libvlc.
    The idea was that if the QFrame is disabled, so must all its children be - thus they will not get any mouse events.
    But even if it would work - you still have the problem using the regular vlc DVD menu which you do want.

    It seems to me this is strictly VLC issue - as you stated - and specifically - about how vlc propagates (or not) events to the host windows.
    You might have more luck in VLC specific forums.

    Good luck!
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Catching Mouse Events on Top-Level Window
    By andyp in forum Qt Programming
    Replies: 6
    Last Post: 8th September 2009, 10:26
  2. Determining when mouse over widget without events
    By Kimmo in forum Qt Programming
    Replies: 2
    Last Post: 7th November 2007, 10:48
  3. Mouse Events in a widget
    By Rayven in forum Qt Programming
    Replies: 2
    Last Post: 5th May 2006, 14:07
  4. Catching X Events
    By nupul in forum Qt Programming
    Replies: 3
    Last Post: 16th April 2006, 12:43
  5. Forwarding mouse events to another widget.
    By yogeshm02 in forum Qt Programming
    Replies: 8
    Last Post: 28th February 2006, 13:25

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.