Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |

# QFilePreview Class Reference

The QFilePreview class provides file previewing in QFileDialog. More...

`#include <qfiledialog.h>`

List of all member functions.

## Public Members

- QFilePreview ()
- virtual void previewUrl ( const QUrl & url ) = 0

## Detailed Description

The QFilePreview class provides file previewing in QFileDialog.

This class is an abstract base class which is used to implement widgets that can display a preview of a file in a QFileDialog.

You must derive the preview widget from both QWidget and from this class. Then you must reimplement this class's previewUrl() function, which is called by the file dialog if the preview of a file (specified as a URL) should be shown.

See also QFileDialog::setPreviewMode(), QFileDialog::setContentsPreview(), QFileDialog::setInfoPreview(), QFileDialog::setInfoPreviewEnabled(), QFileDialog::setContentsPreviewEnabled().

For an example of a preview widget see qt/examples/qdir/qdir.cpp.

See also Miscellaneous Classes.

## Member Function Documentation

### QFilePreview::QFilePreview ()

Constructs the QFilePreview.

### void QFilePreview::previewUrl ( const QUrl & url )`[pure virtual]`

This function is called by QFileDialog if a preview for the url should be shown. Reimplement this function to provide file previewing.

This file is part of the Qt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.