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. How to set Width/Height using visible
Forum Updated to NodeBB v4.3 + New Features

How to set Width/Height using visible

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 2 Posters 911 Views 1 Watching
  • 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.
  • R Offline
    R Offline
    RG90
    wrote on last edited by
    #1

    Hi,

    I want to set width/height depending upon the page to be visible. So, how can I set it to visible so that they can only be visible on particular page screen. Can you help me on this.

    Thanks.

    1 Reply Last reply
    0
    • L Offline
      L Offline
      liubbc
      wrote on last edited by
      #2

      Hi @RG90

      width : id.visible ? 100 : 0;

      Could you give a detailed description about the issue ? A code snippet maybe helpful.

      R 2 Replies Last reply
      0
      • L liubbc

        Hi @RG90

        width : id.visible ? 100 : 0;

        Could you give a detailed description about the issue ? A code snippet maybe helpful.

        R Offline
        R Offline
        RG90
        wrote on last edited by
        #3

        @liubbc

        Here is the code snippet

        Component
        {
        id: component_footer

        HeaderFooter
        {
            property alias text: footer_button.text
            width: itemWidth
            height: itemHeight
            visible: view.currentItem === 0 ? true:false
        
            ButtonText
            {
                id: footer_button
                type: "regular"
                disabled: view.count == 0
                onButtonAction: view.buttonAction(-2, action)
        
                anchors
                {
                    fill: parent
                }
            }
        }
        

        }

        I want to make width/height to be dependent in visible.

        1 Reply Last reply
        0
        • L liubbc

          Hi @RG90

          width : id.visible ? 100 : 0;

          Could you give a detailed description about the issue ? A code snippet maybe helpful.

          R Offline
          R Offline
          RG90
          wrote on last edited by
          #4

          @liubbc

          Hey, it worked for me. Thanks for your help. I am marking it as resolved.

          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