Results 1 to 4 of 4

Thread: [Qt] Changing style in tab

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2009
    Posts
    23
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default [Qt] Changing style in tab

    Hey there,

    I have got a small problem with my app. I don't know how to change the style of text in tab. I want to change style like bold, change font color. I was trying to do it but all tries didn't slove my problem.

    I attach a screen where my problem is. How to change the style of text which is underlined?

    aaa.PNG

    Can you give me the solution of this problem?

    Thanks a lot.

    Best regards.

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [Qt] Changing style in tab

    I guess that is not possible with plain stylesheet.
    You will need to write your own tab bar for that I guess !

  3. #3
    Join Date
    Dec 2009
    Posts
    23
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [Qt] Changing style in tab

    Could you show how should it look like?

  4. #4
    Join Date
    Jul 2010
    Location
    Poland
    Posts
    184
    Thanks
    70
    Thanked 7 Times in 6 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: [Qt] Changing style in tab

    I don't know if It helps, but it works for me just fine:

    Qt Code:
    1. QTabBar::tab:selected {
    2. background: #330099;
    3. height: 20px;
    4. font-style: italic;
    5. font-size: 15px;
    6. color: white;
    7. }
    To copy to clipboard, switch view to plain text mode 

    best regards
    Tomasz

Similar Threads

  1. QSlider: changing the groove without changing the handle
    By Olivier Berten in forum Qt Programming
    Replies: 3
    Last Post: 30th April 2013, 10:02
  2. Do Qt Style Sheets support List-style-image?
    By daiheitan in forum Qt Programming
    Replies: 6
    Last Post: 12th March 2010, 01:41
  3. Problems with Gradient style used through Style sheet on ARM platform
    By puneet.narsapur in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 25th January 2010, 12:48
  4. Replies: 2
    Last Post: 10th August 2009, 09:45
  5. Replies: 1
    Last Post: 7th February 2007, 00:12

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.