KColumnResizer
#include <KColumnResizer>
Protected Member Functions | |
bool | eventFilter (QObject *, QEvent *event) override |
Protected Member Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
Detailed Description
Maintains consistent column sizes across layouts.
KColumnResizer is a helper class which can force columns of different layouts to keep the same width. It is useful to keep label columns consistent.
It works with QGridLayout and QFormLayout.
Here is a typical example:
In this example box1 and box2 children can be organized using QGridLayout or QFormLayout, resizer will ensure the first columns of the two QGroupBox stay the same width.
- Since
- 5.1
Definition at line 65 of file kcolumnresizer.h.
Constructor & Destructor Documentation
◆ KColumnResizer()
Constructs a KColumnResizer.
Definition at line 174 of file kcolumnresizer.cpp.
Member Function Documentation
◆ addWidget()
Add a single widget to the list of widgets whose width is monitored.
It is more common to use addWidgetsFromLayout(), but adding single widgets can be useful if you want to keep a single button the same width as a column in a layout.
- Parameters
-
widget The widget to add
Definition at line 182 of file kcolumnresizer.cpp.
◆ addWidgetsFromLayout()
Add all widgets from layout
which are in column column
to the list of widgets to manage.
- Parameters
-
layout The layout containing the widgets to add. KColumnResizer supports QGridLayout and QFormLayout. column The column number which contains the widgets. If layout is a QFormLayout, column should not be higher than QFormLayout::SpanningRole
Definition at line 209 of file kcolumnresizer.cpp.
◆ eventFilter()
Reimplemented from QObject.
Definition at line 201 of file kcolumnresizer.cpp.
◆ removeWidget()
Remove a widget previously added by addWidget or addWidgetsFromLayout.
- Parameters
-
widget The widget to remove
Definition at line 192 of file kcolumnresizer.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:43 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.