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
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

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

    If you have trouble with that, then - no offense - you should be more concerned with your coding abilities than the gui of your application! Off course you have to extend SOURCES and HEADERS with the includes from fancytabwidget.cpp and so on since you don't use it as a library.

  2. #2
    Join Date
    Sep 2011
    Posts
    11
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows

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

    Quote Originally Posted by Lykurg View Post
    If you have trouble with that, then - no offense - you should be more concerned with your coding abilities than the gui of your application! Off course you have to extend SOURCES and HEADERS with the includes from fancytabwidget.cpp and so on since you don't use it as a library.
    Yes I decided to step foward in looking into C++ sources, and sucessfuly made it work. Still, I had to modify the background, because the two rgb returned black colors, resulting a black background for the fancytabwidget. I had to look into the StyleHelper Class to make my own Gradient, and sucessfuly made it work. Thanks Lykurg

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

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

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

  4. #4
    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 07:03.

Similar Threads

  1. Replies: 3
    Last Post: 15th November 2011, 10:42
  2. Build two programs in one project in creator
    By Gunnar in forum Qt Tools
    Replies: 1
    Last Post: 13th October 2010, 08:52
  3. Replies: 1
    Last Post: 28th February 2010, 06:31
  4. Duplicate a Qt Creator project
    By Coises in forum Newbie
    Replies: 5
    Last Post: 20th December 2009, 19:38
  5. Qt Creator project view
    By JohnToddSr in forum Qt Tools
    Replies: 3
    Last Post: 4th May 2009, 07: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.