<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="/feed.php">
        <title>Documentation Center public:software:dazstudio:4:referenceguide:scripting:language_reference:signals_slots</title>
        <description></description>
        <link>/</link>
        <image rdf:resource="/lib/tpl/dazdoccenter/images/favicon.ico" />
       <dc:date>2026-04-14T09:37:21+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="/public/software/dazstudio/4/referenceguide/scripting/language_reference/signals_slots/start"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="/lib/tpl/dazdoccenter/images/favicon.ico">
        <title>Documentation Center</title>
        <link>/</link>
        <url>/lib/tpl/dazdoccenter/images/favicon.ico</url>
    </image>
    <item rdf:about="/public/software/dazstudio/4/referenceguide/scripting/language_reference/signals_slots/start">
        <dc:format>text/html</dc:format>
        <dc:date>2022-05-04T17:13:15+00:00</dc:date>
        <title>Signals and Slots</title>
        <link>/public/software/dazstudio/4/referenceguide/scripting/language_reference/signals_slots/start</link>
        <description>
&lt;h1 id=&quot;signals_and_slots&quot;&gt;Signals and Slots&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
While developing tools and/or utilities using Daz Script, when one object (the “sender”) changes we often want another object (the “receiver”) to be notified of that change so that the receiving object can react accordingly. Generally speaking, we want objects to be able to communicate with each other when certain events occur. An example of this could be, when the user clicks a &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/button_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:button_dz&quot;&gt;DzButton&lt;/a&gt; labeled “&lt;em&gt;Browse…&lt;/em&gt;” in a dialog, convention suggests that perhaps a &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/filedialog_dz&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:filedialog_dz&quot;&gt;DzFileDialog&lt;/a&gt; would appear and allow the user to navigate to a file and select it.
&lt;/p&gt;

&lt;p&gt;
Other toolkits achieve this type of interaction using a technique referred to as a &lt;a href=&quot;https://en.wikipedia.org/wiki/Callback_(computer_programming)&quot; class=&quot;interwiki iw_wp&quot; target=&quot;_blank&quot; title=&quot;https://en.wikipedia.org/wiki/Callback_(computer_programming)&quot; rel=&quot;noopener&quot;&gt;callback&lt;/a&gt;. While traditional callbacks can be used to an extent in Daz Script &lt;sup&gt;&lt;a href=&quot;#fn__1&quot; id=&quot;fnt__1&quot; class=&quot;fn_top&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt;, the Qt framework &lt;sup&gt;&lt;a href=&quot;#fn__2&quot; id=&quot;fnt__2&quot; class=&quot;fn_top&quot;&gt;2)&lt;/a&gt;&lt;/sup&gt; provides an alternative and achieves this inter-object communication through its &lt;em&gt;Signals and Slots&lt;/em&gt; mechanism.
&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&quot;signal&quot;&gt;Signal&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
A &lt;strong&gt;Signal&lt;/strong&gt; is emitted by an object when its internal state has changed in some way that may be interesting to another object. Notice that many of the &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/start&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:start&quot;&gt;objects&lt;/a&gt; available to Daz Script have a dedicated &amp;#039;Signals&amp;#039; section in their documentation.
&lt;/p&gt;

&lt;p&gt;
Signals are not traditional methods. On the C++ side (i.e., the SDK), only the class that declares a signal and its descendants can “emit” (call) it, but in script causing a &lt;em&gt;signal&lt;/em&gt; to “emit” can be accomplished by invoking the function on an instance of an object and passing in the value to emit.
&lt;/p&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;/_export/code/public/software/dazstudio/4/referenceguide/scripting/language_reference/signals_slots/start?codeblock=0&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_&quot;&gt;Emit_Signal&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code ecmascript&quot;&gt;sender&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;signal&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;hello world!&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;p&gt;
&lt;strong&gt;NOTE:&lt;/strong&gt; Signals cannot be defined in script - signals are defined by C++ classes.
&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&quot;slot&quot;&gt;Slot&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
As far as script is concerned, a &lt;strong&gt;Slot&lt;/strong&gt; (signal handler) is any function that can be called in response to a &lt;em&gt;signal&lt;/em&gt; - i.e. script functions and all script-accessible &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/object_q&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:object_q&quot;&gt;QObject&lt;/a&gt; (and derived) member functions with the exception of &lt;em&gt;constructors&lt;/em&gt;.
&lt;/p&gt;

&lt;/div&gt;

&lt;h2 id=&quot;connections&quot;&gt;Connections&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
In order for a &lt;em&gt;signal&lt;/em&gt; to invoke a &lt;em&gt;slot&lt;/em&gt;, a connection between the &lt;em&gt;signal&lt;/em&gt; and &lt;em&gt;slot&lt;/em&gt; must be established. A &lt;em&gt;signal&lt;/em&gt; may have one or more &lt;em&gt;slot&lt;/em&gt; connected to it. A &lt;em&gt;slot&lt;/em&gt; may be listening (connected) to more than one &lt;em&gt;signal&lt;/em&gt;.
&lt;/p&gt;

&lt;p&gt;
When a &lt;em&gt;signal&lt;/em&gt; is emitted, the &lt;em&gt;slot&lt;/em&gt;(s) connected to it are executed immediately - as though a direct call to the function was made at the same point in the code. The &lt;em&gt;signals and slots&lt;/em&gt; mechanism is completely independent of the &lt;abbr title=&quot;Graphical User Interface&quot;&gt;GUI&lt;/abbr&gt; event loop when this occurs. Once each connected &lt;em&gt;slot&lt;/em&gt; has returned, execution of the code that follows the &lt;em&gt;signal&lt;/em&gt; being emitted will occur. If more than one &lt;em&gt;slot&lt;/em&gt; is connected to a &lt;em&gt;signal&lt;/em&gt;, each &lt;em&gt;slot&lt;/em&gt; will be executed sequentially, in the order that their connections were established.
&lt;/p&gt;

&lt;/div&gt;

&lt;h3 id=&quot;connecting&quot;&gt;Connecting&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
In script, establishing a connection is accomplished by using one of the following methods (in order of recommended use):
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/global&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:global&quot;&gt;Global&lt;/a&gt;::&lt;code&gt;connect(…)&lt;/code&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; Automatically cleaned up when the script goes out of scope&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level1 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/function&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:function&quot;&gt;Function&lt;/a&gt;::&lt;code&gt;scriptConnect(…)&lt;/code&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; Available since 4.14.1.31&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; Automatically cleaned up when the script goes out of scope&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level1 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/function&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:function&quot;&gt;Function&lt;/a&gt;::&lt;code&gt;connect(…)&lt;/code&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; Deprecated since 4.14.1.31&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; Requires a symmetric call to &lt;code&gt;disconnect(…)&lt;/code&gt; or it can result in a memory leak of the &lt;em&gt;receiver&lt;/em&gt; object (and the connection) in future versions - see &lt;a href=&quot;#disconnecting&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:language_reference:signals_slots:start ↵&quot; class=&quot;wikilink1&quot;&gt;Disconnecting&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;

&lt;h3 id=&quot;signal_to_function_connections&quot;&gt;Signal to Function Connections&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;strong&gt;&lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/global&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:global&quot;&gt;Global&lt;/a&gt; syntax:&lt;/strong&gt; &lt;code&gt;connect( sender, “signal”, slot )&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;strong&gt;&lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/function&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:function&quot;&gt;Function&lt;/a&gt; syntax:&lt;/strong&gt; &lt;code&gt;sender.signal.scriptConnect( slot )&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;strong&gt;&lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/function&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:function&quot;&gt;Function&lt;/a&gt; syntax:&lt;/strong&gt; &lt;code&gt;sender.signal.connect( slot )&lt;/code&gt; - &lt;em&gt;deprecated&lt;/em&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
With this type of connection:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;code&gt;slot&lt;/code&gt; is the &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/language_reference/identifiers/start&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:language_reference:identifiers:start&quot;&gt;identifier&lt;/a&gt; (not quoted) of the function to connect to&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;code&gt;slot&lt;/code&gt; can be a member function of a &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/object_q&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:object_q&quot;&gt;QObject&lt;/a&gt; (receiver), as in the first and second examples&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; The argument types of &lt;code&gt;signal&lt;/code&gt; and &lt;code&gt;slot&lt;/code&gt; do not &lt;em&gt;necessarily&lt;/em&gt; have to be compatible - the application will attempt to perform conversion of &lt;code&gt;signal&lt;/code&gt; arguments to match the types of &lt;code&gt;slot&lt;/code&gt; arguments.&lt;sup&gt;&lt;a href=&quot;#fn__3&quot; id=&quot;fnt__3&quot; class=&quot;fn_top&quot;&gt;3)&lt;/a&gt;&lt;/sup&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level1 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;code&gt;slot&lt;/code&gt; can be a script function, as in the third example&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;code&gt;this&lt;/code&gt; in the scope of the &lt;code&gt;slot&lt;/code&gt; function will be the &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/global&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:global&quot;&gt;Global&lt;/a&gt; object&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;/_export/code/public/software/dazstudio/4/referenceguide/scripting/language_reference/signals_slots/start?codeblock=1&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_&quot;&gt;Signal_Global_QObjectSlotRef_Connection&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code ecmascript&quot;&gt;connect&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; sender&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;signal&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; QObject&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;slot&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;/_export/code/public/software/dazstudio/4/referenceguide/scripting/language_reference/signals_slots/start?codeblock=2&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_&quot;&gt;Signal_Function_QObjectSlotRef_Connection&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code ecmascript&quot;&gt;sender&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;signal&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;scriptConnect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; QObject&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;slot&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;/_export/code/public/software/dazstudio/4/referenceguide/scripting/language_reference/signals_slots/start?codeblock=3&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_&quot;&gt;Signal_Function_ScriptFuncRef_Connection&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code ecmascript&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; scriptFunc&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    &lt;span class=&quot;co1&quot;&gt;// ...&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;co1&quot;&gt;// ...&lt;/span&gt;
sender&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;signal&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;scriptConnect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; scriptFunc &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;

&lt;h3 id=&quot;signal_to_member_function_connections&quot;&gt;Signal to Member Function Connections&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;strong&gt;&lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/global&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:global&quot;&gt;Global&lt;/a&gt; syntax:&lt;/strong&gt; &lt;code&gt;connect( sender, “signal”, thisObject, slot )&lt;/code&gt; - since 4.15.0.18&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;strong&gt;&lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/function&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:function&quot;&gt;Function&lt;/a&gt; syntax:&lt;/strong&gt; &lt;code&gt;sender.signal.scriptConnect( thisObject, slot )&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;strong&gt;&lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/function&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:function&quot;&gt;Function&lt;/a&gt; syntax:&lt;/strong&gt; &lt;code&gt;sender.signal.connect( thisObject, slot )&lt;/code&gt; - deprecated&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
With this type of connection:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;code&gt;thisObject&lt;/code&gt; is the object that will be bound to &lt;code&gt;this&lt;/code&gt; in the scope of the &lt;code&gt;slot&lt;/code&gt; function if &lt;code&gt;slot&lt;/code&gt; is a &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/function&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:function&quot;&gt;Function&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;/_export/code/public/software/dazstudio/4/referenceguide/scripting/language_reference/signals_slots/start?codeblock=4&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_&quot;&gt;Signal_Global_MemberFuncRef_Connection&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code ecmascript&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; scriptFunc&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    print&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; oSomeObject &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; x&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;123&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
connect&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; sender&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; signal&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; oSomeObject&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; scriptFunc &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;/_export/code/public/software/dazstudio/4/referenceguide/scripting/language_reference/signals_slots/start?codeblock=5&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_&quot;&gt;Signal_Function_MemberFuncRef_Connection&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code ecmascript&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt; scriptFunc&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    print&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; oSomeObject &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; x&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;123&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
sender&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;signal&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;scriptConnect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; oSomeObject&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; scriptFunc &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;

&lt;h3 id=&quot;signal_to_named_member_function_connections&quot;&gt;Signal to Named Member Function Connections&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;strong&gt;&lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/global&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:global&quot;&gt;Global&lt;/a&gt; syntax:&lt;/strong&gt; &lt;code&gt;connect( sender, “signal”, receiver, “slot” )&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;strong&gt;&lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/function&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:function&quot;&gt;Function&lt;/a&gt; syntax:&lt;/strong&gt; &lt;code&gt;sender.signal.scriptConnect( receiver, “slot” )&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;strong&gt;&lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/function&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:function&quot;&gt;Function&lt;/a&gt; syntax:&lt;/strong&gt; &lt;code&gt;sender.signal.connect( receiver, “slot” )&lt;/code&gt; - deprecated&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
With this type of connection:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;code&gt;receiver&lt;/code&gt; is the object that will be bound to &lt;code&gt;this&lt;/code&gt; in the scope of the &lt;code&gt;slot&lt;/code&gt; function&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;code&gt;slot&lt;/code&gt; is a &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/string&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:string&quot;&gt;String&lt;/a&gt; consisting of the name of a member function on the &lt;code&gt;receiver&lt;/code&gt; object&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;/_export/code/public/software/dazstudio/4/referenceguide/scripting/language_reference/signals_slots/start?codeblock=6&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_&quot;&gt;Signal_Global_NamedMemberFunc_Connection&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code ecmascript&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; oSomeObject &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
	x&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;123&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
	func&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
	    print&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
connect&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; sender&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;signal&amp;quot;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; oSomeObject&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;func&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;/_export/code/public/software/dazstudio/4/referenceguide/scripting/language_reference/signals_slots/start?codeblock=7&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_&quot;&gt;Signal_Function_NamedMemberFunc_Connection&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code ecmascript&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; oSomeObject &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
	x&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;123&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt;
	func&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
	    print&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
	&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
sender&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;signal&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;connect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; oSomeObject&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;func&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;

&lt;h3 id=&quot;overloaded_signals_and_slots&quot;&gt;Overloaded Signals and Slots&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
When a &lt;em&gt;signal&lt;/em&gt; or &lt;em&gt;slot&lt;/em&gt; is overloaded, the application will attempt to pick the appropriate overload based on the actual types of the arguments involved in the function invocation. For example, if an object has &lt;em&gt;slots&lt;/em&gt; &lt;code&gt;someOverloadedSlot(int)&lt;/code&gt; and &lt;code&gt;someOverloadedSlot(QString)&lt;/code&gt;, the following example will behave reasonably:
&lt;/p&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;/_export/code/public/software/dazstudio/4/referenceguide/scripting/language_reference/signals_slots/start?codeblock=8&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_&quot;&gt;Overloaded_Slot_Call&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code ecmascript&quot;&gt;someQObject&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;someOverloadedSlot&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;   &lt;span class=&quot;co1&quot;&gt;// calls the int overload&lt;/span&gt;
someQObject&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;someOverloadedSlot&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;10&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// calls the QString overload&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;p&gt;
You can specify a particular overload by using array-style property access with the normalized signature of the C++ function as the property name:
&lt;/p&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;/_export/code/public/software/dazstudio/4/referenceguide/scripting/language_reference/signals_slots/start?codeblock=9&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_&quot;&gt;Overloaded_Slot_Array-Style_Call&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code ecmascript&quot;&gt;someQObject&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'someOverloadedSlot(int)'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;10&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;   &lt;span class=&quot;co1&quot;&gt;// calls the int overload; the argument is converted to an int&lt;/span&gt;
someQObject&lt;span class=&quot;br0&quot;&gt;&amp;#91;&lt;/span&gt;&lt;span class=&quot;st0&quot;&gt;'someOverloadedSlot(QString)'&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#93;&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;10&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;co1&quot;&gt;// calls the QString overload; the argument is converted to a string&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;p&gt;
If the overloads have different number of arguments, the application will pick the overload with the argument count that best matches the actual number of arguments passed to the &lt;em&gt;slot&lt;/em&gt;.
&lt;/p&gt;

&lt;p&gt;
For overloaded &lt;em&gt;signals&lt;/em&gt;, the application will throw an error if you try to connect to the &lt;em&gt;signal&lt;/em&gt; by name; you have to refer to the &lt;em&gt;signal&lt;/em&gt; with the full normalized signature of the particular overload you want to connect to.
&lt;/p&gt;

&lt;p&gt;
&lt;strong&gt;NOTE:&lt;/strong&gt; &lt;em&gt;Due to changes in future versions of the Qt framework &lt;sup&gt;&lt;a href=&quot;#fn__4&quot; id=&quot;fnt__4&quot; class=&quot;fn_top&quot;&gt;4)&lt;/a&gt;&lt;/sup&gt;, this syntax may not be supported in future versions of the application and should therefore be avoided where possible.&lt;/em&gt;
&lt;/p&gt;

&lt;/div&gt;

&lt;h3 id=&quot;disconnecting&quot;&gt;Disconnecting&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
Signal-Slot connections can also be disconnected. This occurs automatically when the object that emits the &lt;em&gt;signal&lt;/em&gt; is destroyed. Similarly, if the object with the &lt;em&gt;slot&lt;/em&gt; that receives the &lt;em&gt;signal&lt;/em&gt; is destroyed, the connection is automatically broken.
&lt;/p&gt;

&lt;p&gt;
Signal-Slot connections can also be broken programmatically via:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/global&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:global&quot;&gt;Global&lt;/a&gt;::&lt;code&gt;disconnect()&lt;/code&gt; functions&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; Substitute &lt;code&gt;connect&lt;/code&gt; in a connection statement with &lt;code&gt;disconnect&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level1 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/function&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:function&quot;&gt;Function&lt;/a&gt;::&lt;code&gt;scriptDisconnect()&lt;/code&gt; functions&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; Substitute &lt;code&gt;scriptConnect&lt;/code&gt; in a connection statement with &lt;code&gt;scriptDisconnect&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li class=&quot;level1 node&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/function&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:function&quot;&gt;Function&lt;/a&gt;::&lt;code&gt;disconnect()&lt;/code&gt; functions - deprecated&lt;/div&gt;
&lt;ul&gt;
&lt;li class=&quot;level2&quot;&gt;&lt;div class=&quot;li&quot;&gt; Substitute &lt;code&gt;connect&lt;/code&gt; in a connection statement with &lt;code&gt;disconnect&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;

&lt;h3 id=&quot;error_handling&quot;&gt;Error Handling&lt;/h3&gt;
&lt;div class=&quot;level3&quot;&gt;

&lt;p&gt;
When &lt;code&gt;connect()&lt;/code&gt; or &lt;code&gt;disconnect()&lt;/code&gt; succeeds, the function will return &lt;code&gt;undefined&lt;/code&gt;. If either function does not succeed a script exception will be thrown. Obtaining an error message from the resulting &lt;a href=&quot;/public/software/dazstudio/4/referenceguide/scripting/api_reference/object_index/error&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:api_reference:object_index:error&quot;&gt;Error&lt;/a&gt; object can be accomplished as shown below.
&lt;/p&gt;
&lt;dl class=&quot;code&quot;&gt;
&lt;dt&gt;&lt;a href=&quot;/_export/code/public/software/dazstudio/4/referenceguide/scripting/language_reference/signals_slots/start?codeblock=10&quot; title=&quot;Download Snippet&quot; class=&quot;mediafile mf_&quot;&gt;Connection_Error_Handling&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;pre class=&quot;code ecmascript&quot;&gt;&lt;span class=&quot;kw2&quot;&gt;var&lt;/span&gt; oSomeObject &lt;span class=&quot;sy0&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt; x&lt;span class=&quot;sy0&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;nu0&quot;&gt;123&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&amp;nbsp;
&lt;span class=&quot;kw2&quot;&gt;try&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    sender&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;signal&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;me1&quot;&gt;connect&lt;/span&gt;&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; oSomeObject&lt;span class=&quot;sy0&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;st0&quot;&gt;&amp;quot;functionThatDoesNotExist&amp;quot;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt; &lt;span class=&quot;kw2&quot;&gt;catch&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt;e&lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span class=&quot;br0&quot;&gt;&amp;#123;&lt;/span&gt;
    print&lt;span class=&quot;br0&quot;&gt;&amp;#40;&lt;/span&gt; e &lt;span class=&quot;br0&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span class=&quot;sy0&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;br0&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;
&lt;/dd&gt;&lt;/dl&gt;

&lt;/div&gt;

&lt;h2 id=&quot;additional_information&quot;&gt;Additional Information&lt;/h2&gt;
&lt;div class=&quot;level2&quot;&gt;

&lt;p&gt;
The descriptions provided on this page were adapted from relevant portions of the Qt documentation at:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://doc.qt.io/archives/qt-4.8/signalsandslots.html&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://doc.qt.io/archives/qt-4.8/signalsandslots.html&quot; rel=&quot;nofollow noopener&quot;&gt;Signals &amp;amp; Slots&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; &lt;a href=&quot;http://doc.qt.io/archives/qt-4.8/qtwebkit-bridge.html#using-signals-and-slots&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://doc.qt.io/archives/qt-4.8/qtwebkit-bridge.html#using-signals-and-slots&quot; rel=&quot;nofollow noopener&quot;&gt;Using Signals and Slots&lt;/a&gt;.&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;div class=&quot;footnotes&quot;&gt;
&lt;div class=&quot;fn&quot;&gt;&lt;sup&gt;&lt;a href=&quot;#fnt__1&quot; id=&quot;fn__1&quot; class=&quot;fn_bot&quot;&gt;1)&lt;/a&gt;&lt;/sup&gt; 
&lt;div class=&quot;content&quot;&gt;Given its &lt;a href=&quot;http://www.ecmascript.org/about.php&quot; class=&quot;urlextern&quot; target=&quot;_blank&quot; title=&quot;http://www.ecmascript.org/about.php&quot; rel=&quot;nofollow noopener&quot;&gt;ECMAScript&lt;/a&gt; roots.&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;fn&quot;&gt;&lt;sup&gt;&lt;a href=&quot;#fnt__2&quot; id=&quot;fn__2&quot; class=&quot;fn_bot&quot;&gt;2)&lt;/a&gt;&lt;/sup&gt; 
, &lt;sup&gt;&lt;a href=&quot;#fnt__4&quot; id=&quot;fn__4&quot; class=&quot;fn_bot&quot;&gt;4)&lt;/a&gt;&lt;/sup&gt; 
&lt;div class=&quot;content&quot;&gt;The application framework that &lt;a href=&quot;/public/software/dazstudio/start&quot; class=&quot;wikilink1&quot; title=&quot;public:software:dazstudio:start&quot;&gt;Daz Studio&lt;/a&gt; is built on top of.&lt;/div&gt;&lt;/div&gt;
&lt;div class=&quot;fn&quot;&gt;&lt;sup&gt;&lt;a href=&quot;#fnt__3&quot; id=&quot;fn__3&quot; class=&quot;fn_bot&quot;&gt;3)&lt;/a&gt;&lt;/sup&gt; 
&lt;div class=&quot;content&quot;&gt;See &lt;a href=&quot;#error_handling&quot; title=&quot;public:software:dazstudio:4:referenceguide:scripting:language_reference:signals_slots:start ↵&quot; class=&quot;wikilink1&quot;&gt;Error Handling&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;
&lt;/div&gt;
</description>
    </item>
</rdf:RDF>
