Results 1 to 11 of 11

Thread: Qt Project to implement Qt Creator's SideBar (FrancyTabBar)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2008
    Posts
    491
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11
    Thanks
    12
    Thanked 142 Times in 135 Posts

    Default Re: Qt Project to implement Qt Creator's SideBar (FrancyTabBar)

    The user can change the background color at any time. See: FancyColorButton::mousePressEvent()

  2. #2
    Join Date
    Dec 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt Project to implement Qt Creator's SideBar (FrancyTabBar)

    I've implemented the sidebar using empty widget and several pushbuttons styled with stylesheets:

    • layout widget vertically
    • all buttons are checkable
    • last button is disabled and its vertical size policy is set to 'expanding' and it contains no text (its role is to decorate sidebar)
    • implemented rules for QPushButton normal state and 'hover', 'checked', 'disabled' pseudo-classes


    And there is no icons in sidebar...

    Also I created function to make sure that only one of the buttons is checked:

    Qt Code:
    1. void MainWindow::switchButtons(QPushButton *b) { // called when button is clicked
    2. if (b != selectedButton) {
    3. selectedButton->setChecked(false);
    4. selectedButton = b;
    5. }
    6. else
    7. selectedButton->setChecked(true);
    8. }
    To copy to clipboard, switch view to plain text mode 

    x.png
    Last edited by rasufa; 28th December 2011 at 08:03.

Similar Threads

  1. Replies: 3
    Last Post: 15th November 2011, 11:42
  2. Build two programs in one project in creator
    By Gunnar in forum Qt Tools
    Replies: 1
    Last Post: 13th October 2010, 09:52
  3. Replies: 1
    Last Post: 28th February 2010, 07:31
  4. Duplicate a Qt Creator project
    By Coises in forum Newbie
    Replies: 5
    Last Post: 20th December 2009, 20:38
  5. Qt Creator project view
    By JohnToddSr in forum Qt Tools
    Replies: 3
    Last Post: 4th May 2009, 08:48

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.