diff options
author | Samuel Gaist <samuel.gaist@idiap.ch> | 2023-02-23 20:48:48 +0100 |
---|---|---|
committer | Samuel Gaist <samuel.gaist@idiap.ch> | 2023-02-26 20:20:22 +0100 |
commit | a5e96ae1f430cbc68bf5cb3a4058ae5d93cbcfde (patch) | |
tree | 952d36c4d6c4248173ff9f9030b85cdd66825bea /examples/svg | |
parent | d78f378bdd2bac9428819f7004999f3cfbfe7c83 (diff) | |
download | qtsvg-a5e96ae1f430cbc68bf5cb3a4058ae5d93cbcfde.tar.gz |
examples: port drag and drop example to new connection style
Task-number: QTBUG-111463
Change-Id: I02c453682cf06c150ff91f4c923af73966c11ca0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'examples/svg')
-rw-r--r-- | examples/svg/draganddrop/delayedencoding/sourcewidget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/svg/draganddrop/delayedencoding/sourcewidget.cpp b/examples/svg/draganddrop/delayedencoding/sourcewidget.cpp index 2e717de..a782e1b 100644 --- a/examples/svg/draganddrop/delayedencoding/sourcewidget.cpp +++ b/examples/svg/draganddrop/delayedencoding/sourcewidget.cpp @@ -28,7 +28,7 @@ SourceWidget::SourceWidget(QWidget *parent) QPushButton *dragIcon = new QPushButton(tr("Export")); dragIcon->setIcon(QIcon(":/images/drag.png")); - connect(dragIcon, SIGNAL(pressed()), this, SLOT(startDrag())); + connect(dragIcon, &QPushButton::pressed, this, &SourceWidget::startDrag); QGridLayout *layout = new QGridLayout; layout->addWidget(instructTopLabel, 0, 0, 1, 2); @@ -66,8 +66,8 @@ void SourceWidget::startDrag() { mimeData = new MimeData; - connect(mimeData, SIGNAL(dataRequested(QString)), - this, SLOT(createData(QString)), Qt::DirectConnection); + connect(mimeData, &MimeData::dataRequested, + this, &SourceWidget::createData, Qt::DirectConnection); QDrag *drag = new QDrag(this); drag->setMimeData(mimeData); |