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 Update on Monday, May 27th 2025

RowLaoyut reload/refresh after dynamic anchoring

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
layoutanchoringdynamic
1 Posts 1 Posters 294 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 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

    • Login

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