incubator-bluesky-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hz nan <nhongz...@gmail.com>
Subject Re: An question about declaration of a virtual function in a subclass
Date Fri, 17 Dec 2010 09:12:28 GMT
I think this means the function in QIODevice is a virtual function,
and in the AudioInfo this function is rewritten.
I found a word, if a function in a class is defined as a virtual function,
and the function in subclass become virtual funtion automatic though
there is no virtual

nan hongzhen

2010/12/17 Shan Jiang <dane.xjtu@gmail.com>

> In QT project on Linux , Is the declaration of a virtual function in a
> subclass  available without the keyword of ' virtual ' ?
> e.g.
> class QIODevice {
>   .......
>    virtual   qint64 readData(char *data, qint64 maxlen);
> };
>
> class AudioInfo : public QIODevice
> {
>   .....
> protected:
>    qint64 readData(char *data, qint64 maxlen);
> };
> The menber function of readData(...) of AudioInfo is *virtual* ?
>
>
> --
> Shan Jiang a.k.a dane @ Bluesky Dev Team XJTU
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message