Skip to content

QCefViewTest 的拖拽区域 #275

Closed Answered by tishion
L-Super asked this question in Q&A
Jun 4, 2023 · 7 comments · 2 replies
Discussion options

You must be logged in to vote

你想实现的功能叫做Drag & Drop (DND),
DND在每个平台/框架都有一套自己的实现
例如你通过native的Windows窗体实现DND,你需要参考:
https://learn.microsoft.com/en-us/windows/win32/shell/dragdrop

如果你想通过Qt框架来实现Qt窗口的DND,你需要参考:
https://doc.qt.io/qt-6/dnd.html

CEF在NCW模式下,已经对接了系统的DND接口,并且会通过CefDragHandler::OnDragEnter方法来告诉你当前用户有DRAG操作。
在OSR模式下,CEF没有提供任何接口,所以完全需要你自己去是实现(通过Qt感知用户的DND事件,然后传给CEF)。

Replies: 7 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

L-Super
Jun 4, 2023
Maintainer Author

You must be logged in to vote
1 reply
@tishion
Comment options

Comment options

L-Super
Jun 4, 2023
Maintainer Author

You must be logged in to vote
0 replies
Comment options

L-Super
Jun 4, 2023
Maintainer Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tishion
Comment options

You must be logged in to vote
1 reply
@VisionTravelStudio
Comment options

Comment options

L-Super
May 14, 2024
Maintainer Author

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants