Results 1 to 1 of 1

Thread: [Solved] How to set stylesheet for tab from MdiArea in qss file

  1. #1
    Join Date
    Jul 2015
    Posts
    87
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default [Solved] How to set stylesheet for tab from MdiArea in qss file

    Hi,

    i have an mdiadrea in my mainwindow (ui->mdiArea ). I want to change the style of
    the tabs by a qss file.

    The code "QTabBar::tab" is changing all tabs that i have in my application, e.g. in Options Dialog
    what i don't want.

    Qt Code:
    1. QTabBar::tab {
    2. ...
    3. }
    To copy to clipboard, switch view to plain text mode 

    How must i change the line

    Qt Code:
    1. QTabBar::tab {
    To copy to clipboard, switch view to plain text mode 

    that only the tabs in my ui->mdiArea are changed?

    These doesn't work:
    QTabBar::tab #MainWindow
    QTabBar#MainWindow::tab
    QTabBar#mdiArea::tab
    QTabBar#ui->mdiArea::tab

    Thx
    Stefan

    this works:

    Qt Code:
    1. QMdiArea#mdiArea QTabBar::tab
    To copy to clipboard, switch view to plain text mode 
    Last edited by HappyCoder; 6th August 2015 at 11:25.

Similar Threads

  1. MdiArea first window not being selected
    By parsnips146 in forum Newbie
    Replies: 6
    Last Post: 23rd August 2010, 23:38
  2. Qt Designer Use external stylesheet file (qss)
    By florianwalter in forum Qt Tools
    Replies: 0
    Last Post: 27th May 2010, 11:57
  3. simple mdiArea example wanted ..
    By AbuYusuf in forum Qt Programming
    Replies: 1
    Last Post: 11th February 2010, 22:54
  4. positioning sub windows in an mdiarea
    By eric_vi in forum Qt Programming
    Replies: 2
    Last Post: 20th August 2009, 23:08
  5. Squeezing MdiArea tabs
    By truefusion in forum Qt Programming
    Replies: 0
    Last Post: 1st March 2009, 12:21

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.