Hi,

I like your proposal and would like to second it. I do the same in PythonQt (prefer the properties over the getters) and it feels much more natural. But I did not remove the setters/getters, it is just that properties are preferred over setters of the same name when looking them up:

# property access
a.text = "text"
# setter access still possible
a.setText("text")
# can't do that, since getter is named like property
# a.text()

In the case of is* and has*, those are still callable, so

widget.visible = True
widget.setVisible(True)
widget.isVisible()

all work.

Using properties like this is the same approach that QSA and QtScript use.

The drawback is that when porting from PyQt4, one has to modify all getter calls to propery accesses (by removing the ()).

regards,
Florian

Am 16.06.2010 15:26, schrieb [email protected]:
Send PySide mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.openbossa.org/listinfo/pyside
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of PySide digest..."


Today's Topics:

    1. Re: ALMOST compilation of 0.3.1 on Mac/SnowLeopard 10.6.3
       (Hugo Parente Lima)
    2. RFC for another PSEP (Hugo Parente Lima)
    3. Re: RFC for another PSEP (Sivan Greenberg)
    4. Re: RFC for another PSEP (Hugo Parente Lima)
    5. Re: RFC for another PSEP (Sivan Greenberg)
    6. Re: RFC for another PSEP (Luca Donaggio)
    7. New style signals (Luca Donaggio)


----------------------------------------------------------------------

Message: 1
Date: Tue, 15 Jun 2010 15:09:56 -0300
From: Hugo Parente Lima<[email protected]>
To: [email protected]
Subject: Re: [PySide] ALMOST compilation of 0.3.1 on Mac/SnowLeopard
        10.6.3
Message-ID:<[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

On Tuesday 15 June 2010 09:54:28 Gennady Evstratov wrote:
On Jun 14, 2010, at 6:19 PM, Hugo Parente Lima wrote:
Why are you using ports? I did not have to install anything from ports to
compile and install PySide on snow leopard.

I installed cmake (2.6) and Qt (4.6.x) from a .dmg file, xcode from the
snow leopard cd and got all macosx updates.

Ah, I tested only with the code from git HEAD which have some small fixes
to detect phonon and to remove some QTest template functions.
Are you running 32bit Mac OS X or 64bit?
Is a 64bits machine, at least I'm generating 64 bits files, the result of file
command on executables is:

"Mach-O 64-bit executable x86_64"

I have trouble compiling on 64bit mac os x. I have QT from qt.nokia.com,
cmake from ports.
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to