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. Making a simpler FancyTabBar (like QtCreator uses)

Making a simpler FancyTabBar (like QtCreator uses)

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.4k Views
  • 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.
  • W Offline
    W Offline
    wolf.
    wrote on last edited by
    #1

    Question:

    p. I want to build a side button navigation similar to Qt Creator's ("Welcome", "Edit", "Debug", etc). Has anyone tried to make a simple version of that?

    Details:

    p. The code for Qt Creator's side button navigation looks like some hybrid tabbed window, but it's abstracted through so many layers it makes my head spin. The core code is in FancyTabBar.cpp (instantiated in mainwindow.cpp [path: .../qt-creator-src/src/plugins/coreplugin/]). Some of it seems clear (FancyTabBar::paintTab draws some rectangles to create the bar and the buttons), but all the linkage to hook those rectangles to the to the content widgets looses me. I understand that the inner workings of Qt Creator are complex out of necessity, but I was hoping someone was familiar with the logic of how it works and could suggest a much more straight forward way to create that navigation/presentation model.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      Bascially, there's a QStackedLayout (m_modesStack if I recall correctly) which holds the widgets corresponding to the selected icon (aka mode).

      http://www.catb.org/~esr/faqs/smart-questions.html

      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