KHBox

KDE 4.9 PyKDE API Reference

- KDE's Python API

# KHBox Class Reference

`from PyKDE4.kdeui import *`

Inherits: QFrame → QWidget → QObject
Subclasses: KVBox

## Detailed Description

A container widget which arranges its children horizontally. When using a KHBox you don't need to create a layout nor to add the child widgets to it.

Both margin and spacing are initialized to 0. Use QHBoxLayout if you need standard layout margins.

"KDE Horizontal Box containing three buttons"

See also:
  KVBox

## Methods
| __init__ (self, QWidget parent=0)
| __init__ (self, bool vertical, QWidget parent)
| __init__ (self, KHBox a0)
| childEvent (self, QChildEvent ev)
QSize | minimumSizeHint (self)
| setMargin (self, int margin)
| setSpacing (self, int space)
| setStretchFactor (self, QWidget widget, int stretch)
QSize | sizeHint (self)

## Method Documentation

__init__ | ( | self, |
|  | QWidget | parent=0
| ) |  |  |

Creates a new hbox.

__init__ | ( | self, |
|  | bool | vertical,
|  | QWidget | parent
| ) |  |  |

__init__ | ( | self, |
|  | KHBox | a0
| ) |  |  |

childEvent | ( | self, |
|  | QChildEvent | ev
| ) |  |  |

QSize minimumSizeHint | ( |  | self ) |

Calculate the recommended minimum size for this hbox.

setMargin | ( | self, |
|  | int | margin
| ) |  |  |

Sets the margin of the hbox.

setSpacing | ( | self, |
|  | int | space
| ) |  |  |

Sets the spacing between the child widgets to space.

To get the default layout spacing, set space to -1.

setStretchFactor | ( | self, |
|  | QWidget | widget,
|  | int | stretch
| ) |  |  |

Sets the stretch factor of widget to stretch.

QSize sizeHint | ( |  | self ) |

Calculate the recommended size for this hbox.