Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

tabbar scrollbuttons?



  • Hi,

    is there a way to avoid overlapping scrollbuttons at QTabWidget?

    Tab_Scrollbutton.png

    That looks so hampered :(


  • Lifetime Qt Champion

    Hi,

    Did you customize that QTabWidget ? If so how ?



  • Yes.

    following a Qt-blog.
    Do the scrollbuttons have own css-selectors?


  • Lifetime Qt Champion



  • 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?


  • Lifetime Qt Champion

    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:
    QTabRetarded.png
    No arrow-button for arrow-left.

    So it does not depend on my added styles.


  • Lifetime Qt Champion

    Which desktop environment are you using ?



  • debian bullseye with kde, plasma-style "Breeze" and applicationstyle "Fusion"


Log in to reply