Results 1 to 2 of 2

Thread: Styling a QTabWidget

  1. #1
    Join Date
    Apr 2007
    Location
    United States
    Posts
    17
    Thanks
    2
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Question Styling a QTabWidget

    Hey Guys,

    I'm working with a touch screen so the buttons have to be large. I am using a QTabWidget and am having trouble getting the tabs set to a height of 75px. I also have a few buttons set as the QTabWidget's corner widget in the upper right hand side of the screen. They are also set to 100px width and 75 px height. Now they all seem to be set to the right side on there own. However they are being cut off by the starting of the QTabWidgets pane. So i can see the text of the tabs label, but its cut off right through the middle.

    Here is an excerpt from my stylesheet:
    Qt Code:
    1. #DCTabs QTabWidget::pane { /* The tab widget frame */
    2. /*border-top: 2px solid #ffff33;*/
    3. background-color: #000000;
    4. }
    5.  
    6. #DCTabs QTabWidget::tab-bar {
    7. left: 7px;
    8. background-color: #000000;
    9. }
    10.  
    11. #DCTabs QTabBar::tab {
    12. background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #191919, stop: 1 #262626);
    13. border: 2px solid #C4C4C3;
    14. border-bottom-color: #C2C7CB;
    15. border-top-left-radius: 5px;
    16. border-top-right-radius: 20px;
    17. min-width: 5em;
    18. min-height: 75px;
    19. padding: 4px;
    20. margin-left: 0px;
    21. margin-top: 5px;
    22. color: #00FF00;
    23. }
    To copy to clipboard, switch view to plain text mode 

    Any idea how i can solve this problem with stylesheets, or is this something i will have to manually do in code?

    Thanks,
    Chuck

  2. #2
    Join Date
    Apr 2007
    Location
    United States
    Posts
    17
    Thanks
    2
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Talking Re: Styling a QTabWidget

    I ended up solving my problem.

Similar Threads

  1. Force focus to a QTabWidget page's widget
    By thomaspu in forum Qt Programming
    Replies: 1
    Last Post: 2nd January 2008, 06:54
  2. QTabWidget remove a page at the page's request
    By thomaspu in forum Qt Programming
    Replies: 2
    Last Post: 29th December 2007, 20:45
  3. add a label in a QTabWidget
    By sabeesh in forum Qt Programming
    Replies: 2
    Last Post: 1st August 2007, 07:36
  4. Adding QGroupBox to QTabWidget
    By mclark in forum Newbie
    Replies: 2
    Last Post: 17th January 2007, 16:27
  5. QTabWidget Placement and Display
    By mclark in forum Newbie
    Replies: 1
    Last Post: 16th January 2007, 20:34

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.