Pages
API Documentation
On this page

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

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()

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.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.