# class KFontComboBox

###

Module | kdeui
Namespace |
Class | KFontComboBox
Inherits | KComboBox

A lightweight font selection widget.

A combobox to select the font from. Lightweight counterpart to KFontChooser, for situations where only the font family should be selected, while the font style and size are handled by other means. Like in KFontChooser, this widget will show the font previews in the unrolled dropdown list.

The class is similar to QFontComboBox, but more tightly integrated with KDE desktop. Use it instead of QFontComboBox by default in KDE code.

Author Chusslove Illich \<caslav.ilic@gmx.net\>

See also KFontAction

See also KFontChooser

@since 4.1

### methods

- KFontComboBox (parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget | 0

  Constructor.

  parent - the parent widget

- KFontComboBox (a0)

  returns ctor
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  a0 | KFontComboBox |

- currentFont ( )

  returns QFont

  The font currently selected from the list.

  Returns the selected font

- currentFontChanged (font)

  returns Nothing
  SIGNAL ("currentFontChanged (const QFont&)")

  Argument | Type | Default
  --- | --- | ---
  font | QFont |

  Emitted when a new font has been selected, either through user input or by setFont().

  font - the new font

- event (e)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  e | QEvent |

- setCurrentFont (font)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  font | QFont |

  Set the font to show as selected in the combobox.

  font - the new font

- setOnlyFixed (onlyFixed)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  onlyFixed | bool |

  Toggle selectable fonts to be only those of fixed width or all.

  onlyFixed - only fixed width fonts when true, all fonts when false

- sizeHint ( )

  returns QSize

  The recommended size of the widget. Reimplemented to make the recommended width independent of the particular fonts installed.

  Returns recommended size