Results 1 to 7 of 7

Thread: How to disable right click on web page

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2016
    Posts
    15
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default How to disable right click on web page

    Hi all

    How to disable right click on web page which is displayed through QWebEngineView in qt?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to disable right click on web page

    You could try with an event filter, see QObject::eventFilter().

    Cheers,
    _

  3. #3
    Join Date
    Feb 2016
    Posts
    15
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: How to disable right click on web page

    Hi

    Thanks for your answer..

    Sorry iam a neewbie, could you explain me little bit more eloborate... so that it will be useful to me..

    Thanks.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: How to disable right click on web page

    An event filter allows you to see all events going to another object and deciding whether you want the event to reach the recipient or not.

    You need a (direct or indirect) subclass of QObject, implement the eventFilter() method, make it return true for the right mouse button events and install that object on the web engine view as its event filter.

    Cheers,
    _

Similar Threads

  1. Disable right mouse click on QAction
    By stefan in forum Newbie
    Replies: 13
    Last Post: 15th May 2013, 22:04
  2. Replies: 0
    Last Post: 8th November 2011, 11:16
  3. Disable button click
    By "BumbleBee" in forum Newbie
    Replies: 19
    Last Post: 30th March 2011, 13:16
  4. How to disable mouse click over a QSplashScreen
    By graciano in forum Qt Programming
    Replies: 2
    Last Post: 8th November 2009, 16:02
  5. Replies: 3
    Last Post: 25th August 2009, 22:35

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.