Results 1 to 2 of 2

Thread: Disable QListView scroll event

  1. #1
    Join Date
    May 2011
    Posts
    132
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Disable QListView scroll event

    I have QTreeView and every second row QListView with items. Now I can't scroll QTreeView because QTListView is taking the event over.
    Is it possible to disable the scrolling on the list ??

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Disable QListView scroll event

    have a CuctomListView and then ignore the mouse scroll event, so that is passed on to the parent widget
    Qt Code:
    1. void CuctomListView::wheelEvent(QWheelEvent* event) //virtual protected in QWidget
    2. {
    3. event->ignore();
    4. }
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to Santosh Reddy for this useful post:

    migel (28th May 2011)

Similar Threads

  1. How to Disable Scroll Bar of QGraphicsView (or QWidget) ??
    By jiapei100 in forum Qt Programming
    Replies: 5
    Last Post: 6th November 2011, 04:45
  2. How to disable vertical scroll bar in QTableWidget
    By grsandeep85 in forum Qt Programming
    Replies: 2
    Last Post: 14th October 2009, 12:07
  3. QListView with conditional vertical automatic scroll
    By jmesquita in forum Qt Programming
    Replies: 2
    Last Post: 1st August 2009, 04:09
  4. QListView scroll height (solved)
    By efegea in forum Qt Programming
    Replies: 0
    Last Post: 26th April 2009, 15:06
  5. How can I disable the QListView Sorting?
    By darpan in forum Qt Programming
    Replies: 3
    Last Post: 27th June 2006, 11:36

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.