[Qt-interest] QFile private member

andrew.m.goth at l-3com.com andrew.m.goth at l-3com.com
Wed Feb 11 00:28:27 CET 2009


Andy Goth wrote:
> You can also pass a filename to QFile's constructor.

I mean to say, you have the option of passing both a filename and a
parent QObject* to the QFile constructor.  You can also set or modify
the filename and the parent object after creating the QFile, using
setFileName() and setParent().

>From looking at qfile.h, I see that it has four public constructors:

QFile();
QFile(const QString &name);
explicit QFile(QObject *parent);
QFile(const QString &name, QObject *parent);

The default constructor isn't documented, since it's marked internal in
qfile.cpp, unless QT_NO_QOBJECT was #defined when Qt was built.

(Don't know why the constructor from QString isn't explict.)

-- 
Andy Goth
<amgoth at link.com>




More information about the Qt-interest-old mailing list