Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
3b9e37be
Commit
3b9e37be
authored
May 12, 2010
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply type on QtDynamicProperty and allow it to be nillable by default
parent
ebc8c0ab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
util.py
blink/widgets/util.py
+3
-2
No files found.
blink/widgets/util.py
View file @
3b9e37be
...
@@ -12,9 +12,10 @@ class QtDynamicProperty(object):
...
@@ -12,9 +12,10 @@ class QtDynamicProperty(object):
self
.
name
=
name
self
.
name
=
name
self
.
type
=
type
self
.
type
=
type
def
__get__
(
self
,
obj
,
objtype
):
def
__get__
(
self
,
obj
,
objtype
):
return
obj
.
property
(
self
.
name
)
.
toPyObject
()
if
obj
is
not
None
else
self
value
=
self
if
obj
is
None
else
obj
.
property
(
self
.
name
)
.
toPyObject
()
return
value
if
value
in
(
self
,
None
)
else
self
.
type
(
value
)
def
__set__
(
self
,
obj
,
value
):
def
__set__
(
self
,
obj
,
value
):
obj
.
setProperty
(
self
.
name
,
QVariant
(
value
))
obj
.
setProperty
(
self
.
name
,
QVariant
(
value
if
value
is
None
else
self
.
type
(
value
)
))
def
__delete__
(
self
,
obj
):
def
__delete__
(
self
,
obj
):
raise
AttributeError
(
"attribute cannot be deleted"
)
raise
AttributeError
(
"attribute cannot be deleted"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment