Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Main Window Tab bar - possible bug
Forum Updated to NodeBB v4.3 + New Features

Main Window Tab bar - possible bug

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 479 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GrahamL
    wrote on last edited by
    #1

    Hi
    Can someone confirm that the following behavior is expected or whether it is a bug
    I create a main window and add some docked widgets
    At various points in the code I have something like
    @
    QList<QTabBar*> tabBarList = findChildren<QTabBar*>();
    QTabBar* tabBar = NULL;
    if (!tabBarList.isEmpty())
    {
    tabBar = tabBarList.at(0);
    qDebug() << "Count = " << tabBar->count();
    }
    @
    As you can see this code relies on there being only one tab bar.
    My application should restore the the UI to the same state as when it was last run so I do this
    @
    QSettings settings;
    restoreState(settings.value("MainWindow/windowState").toByteArray());
    restoreGeometry(settings.value("MainWindow/geometry").toByteArray());
    @
    Now, when I debug the application there are 2 tab bars for the main window.

    Is this a bug?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved