How to capture TabView tabs order change event
I would to know which signal is emitted when the user drags a tab within a tabview and changes its order.
I'm not exactly sure what a
TabViewis but as it's a view it has to have a
QAbstractItemModelprovides the signals that you are looking for:
The documentation lists all the available signals: https://doc.qt.io/qt-5/qabstractitemmodel.html#signals
Hope that helps.
Thank you for your reply! It's actually a normal TabWidget, I missed that, as I named the component tabview, sorry about that.
Is your response still valid for a tabwidget?
QTabBarthat you can retrieve with
QTabBarhas a signal
tabMoved(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( ....
Thank you very much! Really appreciate your help :)
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