The QFontDialog class provides a dialog widget for selecting a text font. More...
#include <qfontdialog.h>
Inherits QDialog.
This dialog can be used to let the user choose a font with attributes and so on. Normally you may use the static convenience function getFont().
[virtual protected]
Event filter to make up, down, pageup and pagedown work correctly in the line edits.
Reimplemented from QObject.
[protected]
Returns a pointer to the "font family" list box. This is usable mainly if you reimplement updateFontFamilies();.
[signal]
This signal is emitted, when the user changed a setting in the dialog.
[signal]
This signal is emitted, when the user has chosen a font and clicked ok.
[static]
Opens a modal font dialog and returns the font selected by the user.
The ok parameter is set to TRUE if the user clicked OK, and FALSE if the user clicked Cancel.
If the user clicks Cancel the Qt default font is returned.
This static function is less capable than the full QFontDialog object, but is convenient and easy to use.
Example:
// start at the current working directory and with *.cpp as filter bool ok; QFont f = QFontDialog::getFont( &ok, this ); if ( ok ) { // the user selected a valid font } else { // the user cancelled the dialog }
[static]
Opens a modal font dialog and returns the font selected by the user.
initial is the initial selected font.
The ok parameter is set to TRUE if the user clicked OK, and FALSE if the user clicked Cancel.
If the user clicks Cancel the initial font is returned.
This static function is less capable than the full QFontDialog object, but is convenient and easy to use.
Example:
// start at the current working directory and with *.cpp as filter bool ok; QFont f = QFontDialog::getFont( &ok, QFont( "Times", 12 ), this ); if ( ok ) { // the user selected a valid font } else { // the user cancelled the dialog }
Another example:
mywidget.setFont( QFontDialog::getFont( 0, mywidget.font() ) );
[protected]
Returns a pointer to the "font style" list box. This is usable mainly if you reimplement updateFontStyles();.
[protected slot]
This slot is called if the user changes the font size.
[protected]
Returns a pointer to the "font size" list box. This is usable mainly if you reimplement updateFontSizes();.
[protected]
Returns a pointer to the "font style" list box. This is usable mainly if you reimplement updateFontStyles();.
[virtual protected]
Update the contents of the "font family" list box. This function can be reimplemented if you have special requirements.
[virtual protected]
Update the contents of the "font script" combo box. This function can be reimplemented if you have special requirements.
[virtual protected]
Update the contents of the "font size" list box. This function can be reimplemented if you have special requirements.
[virtual protected]
Update the contents of the "font style" list box. This function can be reimplemented if you have special requirements.
Search the documentation, FAQ, qt-interest archive and more (uses
www.trolltech.com):
This file is part of the Qt toolkit, copyright © 1995-2000 Trolltech, all rights reserved.
Copyright © 2000 Trolltech | Trademarks | Qt version 2.2.1
|