[System.Runtime.InteropServices.DllImport("user32.dll")] public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); [System.Runtime.InteropServices.DllImport("user32.dll")] public static extern bool ReleaseCa…
1.效果 黑色这个控件是自定义的,可以在界面拖动 2.新建控件的Qt类,父类是QWidget,带ui的,Control.h #ifndef CONTROL_H #define CONTROL_H #include <QWidget> namespace Ui { class Control; } class Control : public QWidget { Q_OBJECT public: ); ~Control(); int A1X,A1Y; int A2X,A2Y; int press…