tabbar scrollbuttons?
-
Hi,
is there a way to avoid overlapping scrollbuttons at
QTabWidget
?That looks so hampered :(
-
Hi,
Did you customize that QTabWidget ? If so how ?
-
Yes.
following a Qt-blog.
Do the scrollbuttons have own css-selectors? -
Yes, see the example in the documentation.
-
Hi,
apologies for not replying for so long. Was busy with restructuring my project and could not try the tips earlier.
I tried the css selectors as stated in the doc. Unfortunately I could not change the overlay of the scroll buttons.
When I used the non-existent icon from the doc, the previous arrow disappeared. That points out that the css-selectors hit the right element. The only thing is that "margin" has no influence on the display at all.
The display remains as obstructed as in the snapshot.
Any idea, what else could I try?
-
Share a minimal compilable example. That will help people check that
-
use the Qt example "tabdialog" where start of constructor looks like this:
//! [0] TabDialog::TabDialog(const QString &fileName, QWidget *parent) : QDialog(parent) { QFileInfo fileInfo(fileName); tabWidget = new QTabWidget; tabWidget->addTab(new GeneralTab(fileInfo), tr("General")); tabWidget->addTab(new PermissionsTab(fileInfo), tr("Permissions")); tabWidget->addTab(new ApplicationsTab(fileInfo), tr("Applications")); //! [0]
Just add some more tabs and youre ready for the disaster ;)
//! [0] TabDialog::TabDialog(const QString &fileName, QWidget *parent) : QDialog(parent) { QFileInfo fileInfo(fileName); tabWidget = new QTabWidget; tabWidget->addTab(new GeneralTab(fileInfo), tr("General")); tabWidget->addTab(new PermissionsTab(fileInfo), tr("Permissions")); tabWidget->addTab(new ApplicationsTab(fileInfo), tr("Applications")); tabWidget->addTab(new GeneralTab(fileInfo), tr("General2")); tabWidget->addTab(new PermissionsTab(fileInfo), tr("Permissions2")); tabWidget->addTab(new ApplicationsTab(fileInfo), tr("Applications2")); tabWidget->addTab(new GeneralTab(fileInfo), tr("General3")); tabWidget->addTab(new PermissionsTab(fileInfo), tr("Permissions3")); tabWidget->addTab(new ApplicationsTab(fileInfo), tr("Applications3")); //! [0]
No additional styling, nothing. Just the plain example.
Result looks like this:
No arrow-button for arrow-left.So it does not depend on my added styles.
-
Which desktop environment are you using ?
-
debian bullseye with kde, plasma-style "Breeze" and applicationstyle "Fusion"
-
Are you sure that it is not just related to the fact that you are at the far left of the tab list ?
The same happens with macOS. The left button is transparent but as soon as you start moving the tabs with the right arrow, the left one fully appears and becomes usable. It becomes again transparent when full left is reached again.