diff --git a/examples/widgets/mainwindows/mainwindow/colorswatch.cpp b/examples/widgets/mainwindows/mainwindow/colorswatch.cpp index 00a35af..d27a483 100644 --- a/examples/widgets/mainwindows/mainwindow/colorswatch.cpp +++ b/examples/widgets/mainwindows/mainwindow/colorswatch.cpp @@ -665,6 +665,7 @@ void BlueTitleBar::mousePressEvent(QMouseEvent *event) dw->close(); break; case 1: + qDebug() << __FUNCTION__ << event->type() << dw << dw->isFloating(); event->accept(); dw->setFloating(!dw->isFloating()); break; diff --git a/examples/widgets/mainwindows/mainwindow/main.cpp b/examples/widgets/mainwindows/mainwindow/main.cpp index 42493bb..b9b6b48 100644 --- a/examples/widgets/mainwindows/mainwindow/main.cpp +++ b/examples/widgets/mainwindows/mainwindow/main.cpp @@ -158,6 +158,7 @@ int main(int argc, char **argv) QApplication app(argc, argv); QMap customSizeHints = parseCustomSizeHints(argc, argv); MainWindow mainWin(customSizeHints); + mainWin.setObjectName("MainWindow"); mainWin.resize(800, 600); mainWin.show(); return app.exec(); diff --git a/examples/widgets/mainwindows/mainwindow/mainwindow.cpp b/examples/widgets/mainwindows/mainwindow/mainwindow.cpp index fe54f45..cce4980 100644 --- a/examples/widgets/mainwindows/mainwindow/mainwindow.cpp +++ b/examples/widgets/mainwindows/mainwindow/mainwindow.cpp @@ -327,10 +327,12 @@ void MainWindow::setupDockWidgets(const QMap &customSizeHints) for (int i = 0; i < setCount; ++i) { ColorSwatch *swatch = new ColorSwatch(tr(sets[i].name), this, Qt::WindowFlags(sets[i].flags)); + swatch->setObjectName(sets[i].name + QLatin1String("DockWidget")); if (i%2) swatch->setWindowIcon(QIcon(QPixmap(":/res/qt.png"))); if (qstrcmp(sets[i].name, "Blue") == 0) { BlueTitleBar *titlebar = new BlueTitleBar(swatch); + titlebar->setObjectName("BlueTitleBar"); swatch->setTitleBarWidget(titlebar); connect(swatch, SIGNAL(topLevelChanged(bool)), titlebar, SLOT(updateMask())); connect(swatch, SIGNAL(featuresChanged(QDockWidget::DockWidgetFeatures)), titlebar, SLOT(updateMask()), Qt::QueuedConnection); diff --git a/examples/widgets/mainwindows/mainwindow/mainwindow.pro b/examples/widgets/mainwindows/mainwindow/mainwindow.pro index bf92d0e..b63e56a 100644 --- a/examples/widgets/mainwindows/mainwindow/mainwindow.pro +++ b/examples/widgets/mainwindows/mainwindow/mainwindow.pro @@ -7,7 +7,7 @@ build_all:!build_pass { CONFIG -= build_all CONFIG += release } - +CONFIG+=console RESOURCES += mainwindow.qrc # install diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index a753e60..78270c9 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1642,6 +1642,7 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo button, buttons, e->modifiers); dblClickEvent.setTimestamp(e->timestamp); setMouseEventSource(&dblClickEvent, e->source); + qDebug() << __FUNCTION__ << QString::number(quintptr(window), 16); QGuiApplication::sendSpontaneousEvent(window, &dblClickEvent); } } diff --git a/src/widgets/kernel/qwidgetwindow.cpp b/src/widgets/kernel/qwidgetwindow.cpp index 167102c..15e8817 100644 --- a/src/widgets/kernel/qwidgetwindow.cpp +++ b/src/widgets/kernel/qwidgetwindow.cpp @@ -90,12 +90,14 @@ QWidgetWindow::QWidgetWindow(QWidget *widget) : QWindow(*new QWidgetWindowPrivate(), 0) , m_widget(widget) { + qDebug() << __FUNCTION__ << this << m_widget; updateObjectName(); connect(m_widget, &QObject::objectNameChanged, this, &QWidgetWindow::updateObjectName); } QWidgetWindow::~QWidgetWindow() { + qDebug() << __FUNCTION__ << this << m_widget; if (m_widget == qt_tablet_target) qt_tablet_target = 0; }