Re: I need a basic tutorial for GUI creation using Cambalache

Jon Ribbens <[email protected]>
Newsgroups comp.lang.python
Organization A noiseless patient Spider
Message-ID <[email protected]>
On 2026-08-12, Lawrence D’Oliveiro <[email protected]> wrote:
> Here’s an example snippet from my limited dabbling with GTK4 so far:
>
>     ui = \
>         (
>             "<?xml version='1.0' encoding='utf-8'?>\n"
>             "<interface>\n"
>             "    <requires lib='gtk' version='4.0'/>\n"
>             "    <object class='GtkWindow' id='main'>\n"
>             "        <child>\n"
>             "            <object class='GtkGLArea' id='draw'/>\n"
>             "        </child>\n"
>             "    </object>\n"
>             "</interface>\n"
>         )

Just to say that would obviously be a lot easier and cleaner like this:

ui = '''
    <?xml version='1.0' encoding='utf-8'?>
    <interface>
        <requires lib='gtk' version='4.0'/>
        <object class='GtkWindow' id='main'>
            <child>
                <object class='GtkGLArea' id='draw'/>
            </child>
        </object>
    </interface>
'''
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.