Results 1 to 11 of 11

Thread: Why do *Event functions declared in QWidget as protected ?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2007
    Posts
    14
    Thanks
    3

    Default Re: Why do *Event functions declared in QWidget as protected ?

    Quote Originally Posted by jpn View Post
    One can re-implement a virtual event handler in a subclass (this is why they are not private).
    But if it declared as private, it is possible to reimplement it in subclass
    Why not to implement them as private ? It may be caused that in reimplemented event handler it may be need to call QWidget::*Event() of the base class. Correct ?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Why do *Event functions declared in QWidget as protected ?

    Quote Originally Posted by burkav84 View Post
    But if it declared as private, it is possible to reimplement it in subclass
    If they were private, they wouldn't be accessible in subclasses.

Similar Threads

  1. Installation on Fedora Core 4
    By jcr in forum Installation and Deployment
    Replies: 3
    Last Post: 29th January 2009, 01:34
  2. Qt/Embedded Installation error during make
    By mahe2310 in forum Installation and Deployment
    Replies: 5
    Last Post: 7th September 2006, 04:05
  3. Problems
    By euthymos in forum Installation and Deployment
    Replies: 2
    Last Post: 13th June 2006, 19:11
  4. Am I the only one with "make" error ?
    By probine in forum Installation and Deployment
    Replies: 1
    Last Post: 13th February 2006, 12:54
  5. Qt 4.1 and KDE 3.5.1 on OSX 10.2.8
    By Ptero-4 in forum Installation and Deployment
    Replies: 6
    Last Post: 6th February 2006, 02:44

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.