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. RowLaoyut reload/refresh after dynamic anchoring
Forum Updated to NodeBB v4.3 + New Features

RowLaoyut reload/refresh after dynamic anchoring

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
layoutanchoringdynamic
1 Posts 1 Posters 310 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.
  • K Offline
    K Offline
    Kyeiv
    wrote on 23 Apr 2020, 08:17 last edited by
    #1

    Hi all, i have a RowLayout and depending on some variable i have to change its anchoring. (So it is displayed centerd and from right to left)

    Unfortunately it cannot reload when the connection triggers, is there any way to refresh it?

    Code:

    Item
    {
    	id: container
    
    	implicitHeight: layout.implicitHeight
    	implicitWidth: layout.implicitWidth
    
    	RowLayout
    	{
    		id: layout
    		
    		Connections
    		{
    		 	target: container
    		 	onVariableChanged:
    		 	{
    			      if (container.variable.includes("fullScreen"))
    				{	
    		 			layout.anchors.left = undefined
    		 			layout.anchors.right = undefined
    		 			layout.anchors.horizontalCenter = container.horizontalCenter
    		 		}
    		 		else
    		 		{
    		 			layout.anchors.horizontalCenter = undefined
    		 			layout.anchors.left = container.left
    		 			layout.anchors.right = container.right
    		 		}
    		 	}
    		 }
    
    	        SomeItems{...
    
    1 Reply Last reply
    0

    1/1

    23 Apr 2020, 08:17

    • Login

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