Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML - Change a TabView height following its tab child
Qt 6.11 is out! See what's new in the release blog

QML - Change a TabView height following its tab child

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 586 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.
  • JehyeokJ Offline
    JehyeokJ Offline
    Jehyeok
    wrote on last edited by Jehyeok
    #1

    I would like to change a TabView height following its tab child.

    I expect the tabview height is changed to have a height of tab child when currentTab is changed. However, it didn't work with my code below.

    For instance)

    • Tab1 selected: TabView.height: 30 (including tab head and frame)
    • Tab2 selected: TabView.height: 60 (including tab head and frame)

    Could you help me this?

    TabView {
        Tab {
            title: "tab1"
    
            RowLayout {
                Text {
                    text: "Text1"
                }
            }
        }
        Tab {
            title: "tab2"
    
            RowLayout {
                Text {
                    text: "Text1"
                }
                Text {
                    text: "Text2"
                }
                Text {
                    text: "Text3"
                }
            }
        }
    }
    
    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