Results 1 to 2 of 2

Thread: QlistView mouse press

  1. #1
    Join Date
    Mar 2009
    Location
    Israel
    Posts
    20
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default QlistView mouse press

    Hi,
    I use QListView and QDirModel to display file system in thumbnails mode.
    1.I want to clear selection if mouse pressed inside QListView but no item selected?

    2.I tried to capture mouse press event in QListView with installEventFilter, but I got only hover event, despite I enable mouse tracking ?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QlistView mouse press

    Quote Originally Posted by dima View Post
    1.I want to clear selection if mouse pressed inside QListView but no item selected?
    Reimp mouse press event, check if an item is undet the mouse (QListView::indexAt()) if not, clear the selection.

Similar Threads

  1. Problem with mouse press on QGraphicsView.
    By pastispast in forum Qt Programming
    Replies: 10
    Last Post: 13th September 2010, 06:52
  2. Mouse press event in a QGraphicsScene
    By Lykurg in forum Qt Programming
    Replies: 3
    Last Post: 19th June 2009, 10:28
  3. Mouse press event detection
    By A.H.M. Mahfuzur Rahman in forum Qt Programming
    Replies: 1
    Last Post: 14th June 2009, 13:08
  4. Checking for key press on mouse event
    By Cruz in forum Newbie
    Replies: 1
    Last Post: 24th January 2009, 18:18
  5. Replies: 2
    Last Post: 2nd April 2008, 14:19

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.