void OverlayEditor::leaveEvent(QEvent *event) { QGraphicsProxyWidget *qgpw = g.mw->graphicsProxyWidget(); if (qgpw) qgpw->setOpacity(0.3f); qgpw = graphicsProxyWidget(); if (qgpw) qgpw->setOpacity(0.3f); if (qgiPromote) qgiPromote->setZValue(1.0f); QDialog::leaveEvent(event); }
OverlayEditor::~OverlayEditor() { QGraphicsProxyWidget *qgpw = g.mw->graphicsProxyWidget(); if (qgpw) qgpw->setOpacity(0.9f); if (qgiPromote) qgiPromote->setZValue(-1.0f); }
void OpenExistingMap::createUi() { QWidget* widget = new QWidget(); QVBoxLayout* layout = new QVBoxLayout(); layout->setMargin(10); layout->addWidget(m_button); widget->setPalette(QPalette(QPalette::Base)); widget->setLayout(layout); QGraphicsProxyWidget *proxy = m_mapView->scene()->addWidget(widget); proxy->setPos(10, 10); proxy->setOpacity(0.95); QVBoxLayout* vBoxLayout = new QVBoxLayout(); vBoxLayout->addWidget(m_mapView); setLayout(vBoxLayout); }
void ImageProxyItem::Private::onFinished(int /*id*/, QMovie * movie) { QLabel * label = new QLabel; label->setMovie(movie); movie->setParent(label); movie->start(); label->resize(movie->frameRect().size()); QGraphicsProxyWidget * item = new QGraphicsProxyWidget(this->owner); item->setWidget(label); // HACK workaround for https://bugreports.qt.io/browse/QTBUG-55070 item->setOpacity(0.99); this->movie = movie; this->item = item; this->activity = Activity::Activated; emit this->owner->activated(this->owner); }