Results 1 to 2 of 2

Thread: QTabWidget tab icon problem

  1. #1
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default QTabWidget tab icon problem

    Hi,

    I have a QTabWidget which has 4 tabs in it. I wanted to assign a unique icon for each tab and to do so, I opened my designer and played with currentTabIcon parameter for each of the tab.

    Moreover, I give an icon as a parameter when I;

    Qt Code:
    1. QIcon icon(":/images/tab_phone_icon.png");
    2. _ui.tabWidgetCalls->addTab(tab, icon,"");
    To copy to clipboard, switch view to plain text mode 

    I also use qss to give some style to my tabwidget.

    The problem here is icon doesn't seem at all. Instead "0" is being written on my tab.

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QTabWidget tab icon problem

    Works fine here.
    Post a complete, minimal example program (and the associated icon) that demonstrates the problem.

Similar Threads

  1. QTabWidget problem
    By alan lenton in forum Qt Programming
    Replies: 5
    Last Post: 25th July 2016, 16:16
  2. QTabWidget with no text and icon
    By martinn in forum Qt Programming
    Replies: 12
    Last Post: 22nd April 2015, 12:04
  3. QTabWidget problem
    By hnfmr in forum Qt Programming
    Replies: 4
    Last Post: 25th February 2011, 15:10
  4. QTabWidget with icon upper the text.
    By call_from in forum Qt Programming
    Replies: 0
    Last Post: 1st November 2010, 22:35
  5. Animated icon on QTabWidget title
    By ramazangirgin in forum Qt Programming
    Replies: 4
    Last Post: 15th July 2010, 12:44

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.