Important: Please read the Qt Code of Conduct -

QTabWidget: Tab Bar white space double click create new tab ?

  • Like web browser operation

    alt text
    [signal] void QTabWidget::tabBarDoubleClicked(int index)
    This signal is emitted when the user double clicks on a tab at an index.
    index is the index of a clicked tab, or -1 if no tab is under the cursor.
    No tab is under the cursor double clicks doesn't emit signal!

    void MainWindow::tabBarDoubleClick(int index)
        qDebug() << "tab" << index;

  • Lifetime Qt Champion

    You can subclass QTabWidget and see if mousePressed Events is triggered there
    or use event filter to catch it and perform the wanted function.

Log in to reply