The QFontDialog provides a dialog widget for selecting a text font More...
#include <qfontdialog.h>
Inherits QDialog.
Used for allowing the user to select a font among the available fonts on the underlying window system.
[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();.
[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]
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 style" list box. This function can be reimplemented if you have special requirements.
Search the documentation, FAQ, qt-interest archive and more (uses
www.troll.no):
This file is part of the Qt toolkit, copyright © 1995-99 Troll Tech, all rights reserved.
Copyright © 1999 Troll Tech | Trademarks | Qt version 2.0.2
|