[Interest] QTabWidget scroll buttons

Marian Beermann public at enkore.de
Tue Mar 26 15:10:12 CET 2019

You could add a tool-button with said popup menu associated to it to the
right of the tab widget (e.g. Firefox does this). This would have the
advantage from my PoV that it's always there and works, regardless of
how many tabs are open.


Am 26.03.19 um 14:56 schrieb Murphy, Sean:
> Is there a way to get access to the scroll buttons on a QTabWidget to customize them?
> The issue we're having is that we have a UI that uses a tab widget for displaying file contents - one tab per open file. Once a user opens enough files/tabs, the tab scroll buttons pop up (so far so good), but then the user keeps opening more tabs. Eventually they have enough open that it can take quite a while to navigate between open tabs since each click on a scroll button only shifts the visible tabs over by one tab per click. For example, if they have 10 tabs open, and because of screen size, tab elide mode, etc., they can only see 3 tabs at a time, if they are currently looking at the 10th tab, but want to then go view the 1st, they have to click 7 times to get over to the first tab.
> A request has come in to allow the user to right-click on the scroll buttons, which would then open a popup menu of all open tab names which they can select from, and then I could just set the selected tab as the currentIndex(). But I don't see anything on https://doc.qt.io/qt-5/qtabwidget.html that talks about those scroll buttons beyond just the usesScrollButtons property. So I'm not sure how to specifically trigger off from a right click on the scroll arrows themselves...
> Sean
> This message has been scanned for malware by Forcepoint. www.forcepoint.com
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest

More information about the Interest mailing list