Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How can set tab width size on each tab?
QtWS25 Last Chance

How can set tab width size on each tab?

Scheduled Pinned Locked Moved General and Desktop
qt 5.4.1
3 Posts 2 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • darongyiD Offline
    darongyiD Offline
    darongyi
    wrote on last edited by
    #1

    I make tabwidget and put image each tabs.
    Tab width doesn't fit icon size.
    Icon size also change size.
    That's my blog site. I upload code and compile window.

    Put Icon on Qt Tab Bar

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      Did you try setIconSize(...) ?

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      4
      • darongyiD Offline
        darongyiD Offline
        darongyi
        wrote on last edited by
        #3

        Thank you .. I make code like this.
        Draw well.

         QSize tabSizeHint(int index) const
            {
                QSize m_size;
               if( index==0)
               {
                 m_size= QSize(94,50);
                }
                 else if(index==1)
               {
                   m_size= QSize(113,50);
                }
        
               return m_size;
             }
        
        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved