Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

drag&drop细节

  • Loading branch information...
commit 0981c0631676ece2a31308c3a7c20056a9403bf5 1 parent bab26e2
@techblog techblog authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  widget/rytabwidget.cpp
View
3  widget/rytabwidget.cpp
@@ -10,7 +10,7 @@ RyTabWidget::RyTabWidget(QWidget *parent) :
void RyTabWidget::dragEnterEvent(QDragEnterEvent *event){
const RyMimeData* mime = dynamic_cast<const RyMimeData*>(event->mimeData());
if(mime){
- event->setDropAction(Qt::CopyAction);
+ event->setDropAction(Qt::IgnoreAction);
event->accept();
}else{
event->ignore();
@@ -27,6 +27,7 @@ void RyTabWidget::dragMoveEvent(QDragMoveEvent *event){
QPoint p2 = p-tabBar()->pos();
int index = tabBar()->tabAt(p2);
if(index != -1){
+ event->setDropAction(Qt::IgnoreAction);
event->accept();
tabBar()->setCurrentIndex(index);
}else{
Please sign in to comment.
Something went wrong with that request. Please try again.