SeExpr
ExprPopupDoc.cpp
Go to the documentation of this file.
1/*
2* Copyright Disney Enterprises, Inc. All rights reserved.
3*
4* Licensed under the Apache License, Version 2.0 (the "License");
5* you may not use this file except in compliance with the License
6* and the following modification to it: Section 6 Trademarks.
7* deleted and replaced with:
8*
9* 6. Trademarks. This License does not grant permission to use the
10* trade names, trademarks, service marks, or product names of the
11* Licensor and its affiliates, except as required for reproducing
12* the content of the NOTICE file.
13*
14* You may obtain a copy of the License at
15* http://www.apache.org/licenses/LICENSE-2.0
16*/
17#include "ExprPopupDoc.h"
18#include <QLabel>
19#include <QHBoxLayout>
20
21ExprPopupDoc::ExprPopupDoc(QWidget* parent, const QPoint& placecr, const QString& msg) {
22 Q_UNUSED(parent);
23 label = new QLabel(msg);
24 QHBoxLayout* layout = new QHBoxLayout;
25 setLayout(layout);
26 layout->addWidget(label);
27
28 setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint |
29 Qt::X11BypassWindowManagerHint);
30 setAttribute(Qt::WA_ShowWithoutActivating);
31 setFocusPolicy(Qt::NoFocus);
32 move(placecr);
33 raise();
34 show();
35}
36
37void ExprPopupDoc::mousePressEvent(QMouseEvent* event) {
38 Q_UNUSED(event);
39 hide();
40}
ExprPopupDoc(QWidget *parent, const QPoint &cr, const QString &msg)
void mousePressEvent(QMouseEvent *event)
QLabel * label
Definition: ExprPopupDoc.h:27