Use setChangeCurrentOnDrag property to handle drag and drop between tabs

.FIXES #7155
This commit is contained in:
Rosa Hase 2022-03-23 22:47:24 +01:00 committed by Jonathan White
parent 5c45cf2d76
commit 044fc8d50c
4 changed files with 4 additions and 146 deletions

View file

@ -18,6 +18,7 @@
#include "DatabaseTabWidget.h"
#include <QFileInfo>
#include <QTabBar>
#include "autotype/AutoType.h"
#include "core/Tools.h"
@ -26,7 +27,6 @@
#include "gui/DatabaseOpenDialog.h"
#include "gui/DatabaseWidget.h"
#include "gui/DatabaseWidgetStateSync.h"
#include "gui/DragTabBar.h"
#include "gui/FileDialog.h"
#include "gui/HtmlExporter.h"
#include "gui/MessageBox.h"
@ -42,7 +42,9 @@ DatabaseTabWidget::DatabaseTabWidget(QWidget* parent)
, m_dbWidgetPendingLock(nullptr)
, m_databaseOpenDialog(new DatabaseOpenDialog(this))
{
auto* tabBar = new DragTabBar(this);
auto* tabBar = new QTabBar(this);
tabBar->setAcceptDrops(true);
tabBar->setChangeCurrentOnDrag(true);
setTabBar(tabBar);
setDocumentMode(true);