Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.

Squish/Keeping an Object Tree Tidy: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
(Move [[Category::Tools::Squish]] -> [[Category::Squish]])
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
h1. Keep a tidy object tree
[[Category:Squish]]
 
= Keep a tidy object tree =
Always remember to keep your tree clean by removing old objects from it or adapting the object properties to match the new layout of the application. This will accomplish 2 things:
Always remember to keep your tree clean by removing old objects from it or adapting the object properties to match the new layout of the application. This will accomplish 2 things:
1)You keep a comprehensive relationship of the objects that do exist in your application rather than a tree with every object the application has ever seen.
1)You keep a comprehensive relationship of the objects that do exist in your application rather than a tree with every object the application has ever seen.
2)You will fix your application much easily.
2)You will fix your application much easily.


It can be the case that a particular object is particularly hard to predict, perhaps your application title changes with every revision of your application. If so, every build could, potentially, break your Q&A. Instead of trying to manually correct it or compute at run time, you should use the squish built in different modes to match properties. Remember that there exists a wildcard mode:
It can be the case that a particular object is particularly hard to predict, perhaps your application title changes with every revision of your application. If so, every build could, potentially, break your Q&A. Instead of trying to manually correct it or compute at run time, you should use the squish built in different modes to match properties. Remember that there exists a wildcard mode:


<code>{title?='SomeApp*' type='QMainWindow'}<code>
<code>{title?='SomeApp*' type='QMainWindow'}<code>

Latest revision as of 08:46, 25 November 2017

Keep a tidy object tree

Always remember to keep your tree clean by removing old objects from it or adapting the object properties to match the new layout of the application. This will accomplish 2 things: 1)You keep a comprehensive relationship of the objects that do exist in your application rather than a tree with every object the application has ever seen. 2)You will fix your application much easily.

It can be the case that a particular object is particularly hard to predict, perhaps your application title changes with every revision of your application. If so, every build could, potentially, break your Q&A. Instead of trying to manually correct it or compute at run time, you should use the squish built in different modes to match properties. Remember that there exists a wildcard mode:

{title?='SomeApp*' type='QMainWindow'}<code>

and a regular expression mode:

{title~='SomeApp.*' type='QMainWindow'}

This way you can avoid creating too many objects and keep your tree clean.