Results 1 to 3 of 3

Thread: after subclassing will the inbuild signals work

  1. #1
    Join Date
    Nov 2007
    Posts
    291
    Thanks
    85
    Thanked 1 Time in 1 Post

    Question after subclassing will the inbuild signals work

    hi
    i have subclassed the qlistview class to receive mouse double click event .
    after this the inbuild signal for double click(doubleClicked(QModelIndex) has no effed.

    i have even tried ignoring(event-.ignore) the event inside the mouse doubleclick
    event function(which is subclassed)

    so if a function is subclassed does the inbuild signals stop functioning.

  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: after subclassing will the inbuild signals work

    if you want only to extend functionality available in the base class, you can add in your subclass implementation the base class version call:
    Qt Code:
    1. void DerivedClass::methodName()
    2. {
    3. BaseClass::methodName(); //base class functionality
    4. // your own extended functionality code
    5. }
    To copy to clipboard, switch view to plain text mode 
    ==========================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.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: after subclassing will the inbuild signals work

    To be precise - you have to add it.

Similar Threads

  1. can't make QAbstractItemView signals work
    By ber_44 in forum Qt Programming
    Replies: 1
    Last Post: 29th May 2007, 07:29
  2. QHttp signals don't work !!
    By probine in forum Qt Programming
    Replies: 11
    Last Post: 11th January 2007, 15:02

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.