How to capture TabView tabs order change event
Solved
General and Desktop
-
I'm not exactly sure what a
TabView
is but as it's a view it has to have aQAbstractItemModel
somewhere.
TheQAbstractItemModel
provides the signals that you are looking for:QAbstractItemModel::columnsMoved()
QAbstractItemModel::rowsMoved()
- ...
The documentation lists all the available signals: https://doc.qt.io/qt-5/qabstractitemmodel.html#signals
Hope that helps.
-
The
QTabWidget
contains aQTabBar
that you can retrieve withQTabWidget::tabBar()
. TheQTabBar
has a signaltabMoved(int from, int to)
that you can use.
Therefore, you'd end up with something like this:connect(_myTabWidget->tabBar(), SIGNAL(tabMoved(int, int)), this, SLOT( ....
-
You're welcome!
Please mark this topic as solved if you feel that your problem/question has been solved.
Guide on that: https://forum.qt.io/topic/62700/hitchhiker-s-visual-guide-to-the-qt-forum