KPopupFrame Class
Frame with popup menu behavior. More...
- Header:
#include <KPopupFrame> - CMake:
find_package(KF6 REQUIRED COMPONENTS WidgetsAddons)
target_link_libraries(mytarget PRIVATE KF6::WidgetsAddons) - Inherits: QFrame
List of all members, including inherited members
Public Functions
- KPopupFrame(QWidget *parent = nullptr)
- int exec(const QPoint &p)
- int exec(int x, int y)
- void popup(const QPoint &pos)
- void resizeEvent(QResizeEvent *resize)
- void setMainWidget(QWidget *m)
Public Slots
Signals
Detailed Description
Member Function Documentation
KPopupFrame::KPopupFrame(QWidget *parent = nullptr)
The constructor. Creates a dialog without buttons.
[slot] void KPopupFrame::close(int r)
Close the popup window. This is called from the main widget, usually.
r is the result returned from exec()
int KPopupFrame::exec(const QPoint &p)
Execute the popup window.
int KPopupFrame::exec(int x, int y)
Execute the popup window.
[signal] void KPopupFrame::leaveModality()
void KPopupFrame::popup(const QPoint &pos)
Open the popup window at position pos.
[override virtual] void KPopupFrame::resizeEvent(QResizeEvent *resize)
Reimplements: QWidget::resizeEvent(QResizeEvent *event).
The resize event. Simply resizes the main widget to the whole widgets client size.
void KPopupFrame::setMainWidget(QWidget *m)
Set the main widget. You cannot set the main widget from the constructor, since it must be a child of the frame itself. Be careful: the size is set to the main widgets size. It is up to you to set the main widgets correct size before setting it as the main widget.