blob: 9455cacf1c8a9eafc64396e7da30aa2d2ee6aac8 (
plain)
12345678910111213141516171819202122232425262728293031323334353637 | // Copyright (C) 2016 The Qt Company Ltd.// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause#include <QApplication>#include <QStyleFactory>#include <QWidget>namespace src_gui_kernel_qapplication {struct MyWidget { QSize sizeHint()const;int foo =0; MyWidget operator- (MyWidget& other){ MyWidget tmp = other;return tmp;};intmanhattanLength() {return0; }};voidstartTheDrag() {};voidwrapper1() { MyWidget startPos; MyWidget currentPos;int x =0;int y =0;//! [6]if((startPos - currentPos).manhattanLength() >=QApplication::startDragDistance())startTheDrag();//! [6]}// wrapper1}// src_gui_kernel_qapplication
|