[Interest] QTabWidget scroll buttons

André Pönitz apoenitz at t-online.de
Wed Mar 27 04:41:54 CET 2019


On Tue, Mar 26, 2019 at 09:19:37PM +0000, Murphy, Sean wrote:
> > > there doesn't appear to be an easy way to add widgets in the tab widget's
> > tab bar.
> > 
> > QTabWidget::tabBar(), layout(), addItem() ?
> 
> I meant "easy" in the sense of a functions like these (which don't exist):
> QToolButton* QTabWidget::leftScrollButton() QToolButton*
> QTabWidget::rightScrollButton()
> 
> Unless I'm missing something, both your tabBar()->layout()->addItem() suggestion
> and your previous email about drilling down and finding the QToolButton children
> aren't part of the QTabWidget documented API, which means they could change how
> those are implemented in a future version of Qt.

You are completely right, you would be relying on an implementation
detail that in principle could change in future.

However, that's an area that hasn't changed for ages, the overall layout
probably not since Qt 2(!). I don't think this is likely to change.

Sure, a dedicated QToolButton* QTabWidget::leftScrollButton() would
be more convenient for you.

Andre'



More information about the Interest mailing list