dismiss dialog close if we are over the dialog at button release
This commit is contained in:
parent
3f73928cf9
commit
4dca0e4d12
|
@ -71,11 +71,15 @@ public:
|
|||
void mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
event->accept();
|
||||
m_dialog->view()->winId();
|
||||
KWindowSystem::forceActiveWindow(m_dialog->view()->winId());
|
||||
}
|
||||
|
||||
void mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
m_dialog->close();
|
||||
if (!m_dialog->view()->geometry().contains(event->globalPos())) {
|
||||
m_dialog->close();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -260,6 +264,11 @@ void FullScreenDialog::setVisible(const bool visible)
|
|||
}
|
||||
}
|
||||
|
||||
QGraphicsView *FullScreenDialog::view() const
|
||||
{
|
||||
return m_view;
|
||||
}
|
||||
|
||||
QDeclarativeListProperty<QGraphicsObject> FullScreenDialog::title()
|
||||
{
|
||||
if (m_rootObject) {
|
||||
|
|
|
@ -54,6 +54,7 @@ public:
|
|||
bool isVisible() const;
|
||||
void setVisible(const bool visible);
|
||||
|
||||
QGraphicsView *view() const;
|
||||
|
||||
//QML properties
|
||||
QDeclarativeListProperty<QGraphicsObject> title();
|
||||
|
|
Loading…
Reference in New Issue
Block a user