IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

Editing Resources with Qt Designer

Qt Designer Manual.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

Editing Resources with Qt Designer

Image non disponible

Qt Designer fully supports the Qt Resource System, enabling resources to be specified together with forms as they are designed. To aid designers and developers manage resources for their applications, Qt Designer's resource editor allows resources to be defined on a per-form basis. In other words, each form can have a separate resource file.

Defining a Resource File

To specify a resource file you must enable the resource editor by opening the Tools menu, and switching on the Resource Browser option.

Image non disponible

Resource Files

Within the resource browser, you can open existing resource files or create new ones. Click the Edit Resources button Image non disponible to edit your resources. To reload resources, click on the Reload button Image non disponible .

Once a resource file is loaded, you can create or remove entries in it using the given Add Files Image non disponible and Remove Files Image non disponible buttons, and specify resources (e.g., images) using the Add Files button Image non disponible . Note that these resources must reside within the current resource file's directory or one of its subdirectories.

Image non disponible

Editing Resource Files

Press the Image non disponible button to add a new resource entry to the file. Then use the Add Files button Image non disponible to specify the resource.

You can remove resources by selecting the corresponding entry in the resource editor, and pressing the Image non disponible button.

Using the Resources

Once the resources are defined you can use them actively when composing your form. For example, you might want to create a tool button using an icon specified in the resource file.

Image non disponible

Using Resources

When changing properties with values that may be defined within a resource file, Qt Designer's property editor allows you to specify a resource in addition to the option of selecting a source file in the ordinary way.

Image non disponible

Selecting a Resource

You can open the resource selector by clicking Choose Resource... to add resources any time during the design process.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+