Results 1 to 3 of 3

Thread: Disable MouseEvent function

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Disable MouseEvent function

    use event filter with mouseevent ..

    Qt Code:
    1. bool Window::eventFilter(QObject *watched, QEvent* e)
    2. {
    3. if (watched == chatEdit && e->type() == QEvent::MouseEvent) {
    4. /** ignore it */
    5. return true;
    6. }
    7. }
    8. return QWidget::eventFilter(watched, e);
    9. }
    To copy to clipboard, switch view to plain text mode 

    and dont forget to install it and remove whenever it required ..
    view->installEventFilter(this);
    "Behind every great fortune lies a crime" - Balzac

  2. The following user says thank you to wagmare for this useful post:

    2lights (26th August 2013)

Similar Threads

  1. qt mouseEvent
    By lapdx in forum Qt Programming
    Replies: 0
    Last Post: 8th November 2012, 13:37
  2. mouseEvent with two mice
    By yun in forum Newbie
    Replies: 0
    Last Post: 6th May 2009, 10:25
  3. problem in mouseEvent
    By wagmare in forum Qt Programming
    Replies: 7
    Last Post: 9th April 2009, 06:20
  4. How did I disable auto-scrolling function in tree-view
    By alfa_wu in forum Qt Programming
    Replies: 1
    Last Post: 28th September 2007, 08:31
  5. MouseEvent on a line
    By Kapil in forum Newbie
    Replies: 1
    Last Post: 25th March 2006, 08:52

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.