KSeExpr 6.0.0.0
ExprPopupDoc.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2011-2019 Disney Enterprises, Inc.
2// SPDX-License-Identifier: LicenseRef-Apache-2.0
3// SPDX-FileCopyrightText: 2020 L. E. Segovia <amy@amyspark.me>
4// SPDX-License-Identifier: GPL-3.0-or-later
5
6#include "ExprPopupDoc.h"
7#include <QHBoxLayout>
8#include <QLabel>
9
10
11ExprPopupDoc::ExprPopupDoc(QWidget *parent, const QPoint &placecr, const QString &msg)
12{
13 Q_UNUSED(parent);
14 label = new QLabel(msg);
15 auto *layout = new QHBoxLayout;
16 setLayout(layout);
17 layout->addWidget(label);
18
19 setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint | Qt::X11BypassWindowManagerHint);
20 setAttribute(Qt::WA_ShowWithoutActivating);
21 setFocusPolicy(Qt::NoFocus);
22 move(placecr);
23 raise();
24 show();
25}
26
27void ExprPopupDoc::mousePressEvent(QMouseEvent *event)
28{
29 Q_UNUSED(event);
30 hide();
31}
ExprPopupDoc(QWidget *parent, const QPoint &cr, const QString &msg)
QLabel * label
void mousePressEvent(QMouseEvent *event) override