[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] button delegate in a tableview
From: Mads Ipsen <mads.ipsen () gmail ! com>
Date: 2013-01-30 16:39:02
Message-ID: 51094CA6.3000707 () gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi,
You could consider using setIndexWidget() on the TableView. But some
care should be taken if you also use a QSortFilterProxyModel for
filtering your data.
Best,
Mads
On 01/30/2013 11:32 AM, Cristobal Infante wrote:
> Hi,
>
> Sorry to bump this thread again.
>
> I am almost done with my PYQT application but I still have this
> glitch on my button delegate..
>
> Are there any alternatives to using buttons delegate in tableviews?
>
> But I need a button per row...
>
> Best,
> Cris
>
> On 8 November 2012 21:53, Cristobal Infante <cgcris@gmail.com
> <mailto:cgcris@gmail.com>> wrote:
>
> Hi Erik,
>
> Thanks again for your reply, It's good to know that at least I am
> making some progress
> with PyQt and have arrived to a dead end ;)
>
> To be honest I am fine with it, will just have to explain my users
> they will have to
> activate the cell before clicking.
>
> The important thing was to have my button clicking and that has
> been achieved.
>
> Thanks!
> Cris
>
>
> On 8 November 2012 17:09, Erik Janssens
> <Erik.Janssens@conceptive.be <mailto:Erik.Janssens@conceptive.be>>
> wrote:
>
> Hi Chris,
>
> I'm not sure if this can be fixed, maybe you can ask this
>
> on the Qt info mailing list. If it can be fixed, I'm interested
>
> in the solution ;)
>
> What happens is, when the TableWidget receives a click, it
>
> creates an editor, but the editor has not yet received the
>
> click. That is perfect in most cases, but in case you draw
>
> a button it isn't.
>
> Cheers,
>
> Erik
>
> On Wednesday, November 07, 2012 02:50:17 PM Cristobal Infante
> wrote:
>
> Hi Eric,
>
> Thanks for the tip, I've managed to get my button inside my
> tableview.
>
> There is only one thing that bothers me, not sure if it is a
> limitation or something I can fix.
>
> To be able to press a button, I need to "activate" the
> containing cell with a click.
> Once the cell is active I can press the button. This could
> become confusing for your average user.
>
> Is this fixable?
>
> Best,
> Cris
>
>
>
>
> On 6 November 2012 22:05, <Erik.Janssens@conceptive.be
> <mailto:Erik.Janssens@conceptive.be>> wrote:
>
> The delegate itself can only paint, it cannot react to
>
> clicks, you should implement the createEditor method,
>
> the editor then reacts to clicks
>
> On Tuesday, November 06, 2012 09:59:03 PM Cristobal Infante wrote:
>
> Hi,
>
>
> I am trying to embed a button per row inside a tableview. My
> botton are drawing correctly as delegates but are not reacting
> to any clicks.
>
>
> Should I be setting flags for this column? so far I have
> something like:
>
>
> if index.column() == 14:
>
> flags |= QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsUserCheckable | \
> Qt.ItemIsEnabled
> return flags
>
>
>
> This is my delegate, but how do I make the button react to clicks?
>
>
> Thanks,
>
> cris
>
>
>
>
> class AButton(QtGui.QStyledItemDelegate):
>
> mouse_isPressed = False
>
>
>
>
>
> def __init__(self, parent = None):
>
> QtGui.QStyledItemDelegate.__init__(self, parent)
>
>
>
>
>
> def boundingRect(self):
>
> return QtCore.QRectF(0, 0, 40, 40)
>
>
>
>
>
> def paint(self, painter, option, widget = 0):
>
> opt = QtGui.QStyleOptionButton()
>
>
>
>
>
> opt.state = ((QtGui.QStyle.State_Sunken if self.mouse_isPressed else \
> QtGui.QStyle.State_Raised) | QtGui.QStyle.State_Enabled)
> opt.text = self.text()
>
> opt.icon = self.icon()
>
> opt.rect = option.rect
>
> opt.palette = option.palette
>
> QtGui.QApplication.style().drawControl(QtGui.QStyle.CE_PushButton, opt, painter)
>
>
>
>
>
> def text(self):
>
> return QtCore.QString("hi")
>
>
>
>
>
> def icon(self):
>
> return QtGui.QIcon()
>
>
>
>
>
> def mousePressEvent(self, event):
>
> self.mouse_isPressed = True
>
> print "HELLO"
>
> self.update()
>
>
>
>
>
> def mouseReleaseEvent(self, event):
>
> self.mouse_isPressed = False
>
> self.update()
>
>
>
>
> _______________________________________________
> PyQt mailing list PyQt@riverbankcomputing.com
> <mailto:PyQt@riverbankcomputing.com>
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
>
>
>
>
> _______________________________________________
> PyQt mailing list PyQt@riverbankcomputing.com
> <mailto:PyQt@riverbankcomputing.com>
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
>
>
>
>
> _______________________________________________
> PyQt mailing list PyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
--
+-----------------------------------------------------+
> Mads Ipsen |
+----------------------+------------------------------+
> Gåsebæksvej 7, 4. tv | |
> DK-2500 Valby | phone: +45-29716388 |
> Denmark | email: mads.ipsen@gmail.com |
+----------------------+------------------------------+
[Attachment #5 (text/html)]
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi,<br>
<br>
You could consider using setIndexWidget() on the TableView. But
some care should be taken if you also use a QSortFilterProxyModel
for filtering your data.<br>
<br>
Best,<br>
<br>
Mads<br>
<br>
On 01/30/2013 11:32 AM, Cristobal Infante wrote:<br>
</div>
<blockquote
cite="mid:CAL3mZ3jGhBwBOhKN73_N8Cz1pTvO2X6vP5KB09oKUQh2z3OxeA@mail.gmail.com"
type="cite">Hi,
<div><br>
</div>
<div>Sorry to bump this thread again.</div>
<div><br>
</div>
<div>I am almost done with my PYQT application but I still have
this glitch on my button delegate..</div>
<div><br>
</div>
<div>Are there any alternatives to using buttons delegate in
tableviews?</div>
<div><br>
</div>
<div>But I need a button per row...</div>
<div><br>
</div>
<div>Best,</div>
<div>Cris<br>
<br>
<div class="gmail_quote">On 8 November 2012 21:53, Cristobal
Infante <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:cgcris@gmail.com" \
target="_blank">cgcris@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Erik,
<div><br>
</div>
<div>Thanks again for your reply, It's good to know that at
least I am making some progress</div>
<div>with PyQt and have arrived to a dead end ;)</div>
<div><br>
</div>
<div>To be honest I am fine with it, will just have to
explain my users they will have to</div>
<div>activate the cell before clicking.</div>
<div><br>
</div>
<div>The important thing was to have my button clicking and
that has been achieved.</div>
<div><br>
</div>
<div>Thanks!</div>
<div>Cris</div>
<div class="HOEnZb">
<div class="h5">
<div><br>
<br>
<div class="gmail_quote">
On 8 November 2012 17:09, Erik Janssens <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:Erik.Janssens@conceptive.be"
target="_blank">Erik.Janssens@conceptive.be</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-family:'Sans
Serif';font-size:9pt;font-weight:400;font-style:normal">
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Hi
Chris,</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">I'm
not sure if this can be fixed, maybe you can
ask this</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">on
the Qt info mailing list. If it can be fixed,
I'm interested</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">in
the solution ;)</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">What
happens is, when the TableWidget receives a
click, it</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">creates
an editor, but the editor has not yet received
the</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">click.
That is perfect in most cases, but in case you
draw</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">a
button it isn't.</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Cheers,</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Erik</p>
<div>
<div>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> </p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">On
Wednesday, November 07, 2012 02:50:17 PM
Cristobal Infante wrote:<br>
</p>
<p
style="margin-top:12px;margin-bottom:12px;margin-left:40px;margin-right:40px;text-indent:0px">Hi
Eric,<br>
<br>
Thanks for the tip, I've managed to get my
button inside my tableview.<br>
<br>
There is only one thing that bothers me,
not sure if it is a limitation or
something I can fix.<br>
<br>
To be able to press a button, I need to
"activate" the containing cell with a
click. <br>
Once the cell is active I can press the
button. This could become confusing for
your average user.<br>
<br>
Is this fixable?<br>
<br>
Best,<br>
Cris<br>
<br>
<br>
<br>
<br>
</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:40px;margin-right:40px;text-indent:0px">On
6 November 2012 22:05, <<a
moz-do-not-send="true"
href="mailto:Erik.Janssens@conceptive.be"
target="_blank"><span
\
style="text-decoration:underline;color:#0057ae">Erik.Janssens@conceptive.be</span></a>>
wrote:<br>
</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:44px;margin-right:40px;text-indent:0px">The
delegate itself can only paint, it cannot
react to</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:44px;margin-right:40px;text-indent:0px">clicks,
you should implement the createEditor
method,</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:44px;margin-right:40px;text-indent:0px">the
editor then reacts to clicks</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:44px;margin-right:40px;text-indent:0px"> </p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:44px;margin-right:40px;text-indent:0px">On
Tuesday, November 06, 2012 09:59:03 PM
Cristobal Infante wrote:<br>
</p>
<p
style="margin-top:12px;margin-bottom:12px;margin-left:84px;margin-right:80px;text-indent:0px">Hi,</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px"><br>
</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px">I<span
style="font-family:'Arial,Liberation
Sans,DejaVu
Sans,sans-serif';font-size:14px"> am
trying to embed a button per row inside
a tableview. My botton are drawing
correctly as delegates but are not
reacting to any clicks.</span> </p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px"><span
style="font-family:'Arial,Liberation
Sans,DejaVu
Sans,sans-serif';font-size:14px"><br>
</span></p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px"><span
style="font-family:'Arial,Liberation
Sans,DejaVu
Sans,sans-serif';font-size:14px">Should
I be setting flags for this column? so
far I have something like:</span><br>
</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px"><br>
</p>
<pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> if \
index.column() == 14:</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> \
flags |= QtCore.Qt.ItemIsSelectable | QtCore.Qt.ItemIsUserCheckable | \
Qt.ItemIsEnabled</span> </pre> <pre \
style="margin-top:0px;margin-bottom:10px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> return \
flags </span> </pre> <p
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px"><br>
</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px"><br>
</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px">This
is my delegate, but how do I make the
button react to clicks?</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px"><br>
</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px">Thanks,</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px">cris</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px"><br>
</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px"><br>
</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px"><br>
</p>
<pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px">class \
AButton(QtGui.QStyledItemDelegate):</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier \
New,monospace,serif';font-size:14px">mouse_isPressed = False</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px">
</span></pre>
<pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px">def \
__init__(self, parent = None):</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> \
QtGui.QStyledItemDelegate.__init__(self, parent)</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px">
</span></pre>
<pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px">def \
boundingRect(self):</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> return \
QtCore.QRectF(0, 0, 40, 40)</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px">
</span></pre>
<pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px">def \
paint(self, painter, option, widget = 0):</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> opt = \
QtGui.QStyleOptionButton()</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px">
</span></pre>
<pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> \
opt.state = ((QtGui.QStyle.State_Sunken if self.mouse_isPressed else \
QtGui.QStyle.State_Raised) | QtGui.QStyle.State_Enabled)</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> \
opt.text = self.text()</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> \
opt.icon = self.icon()</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> \
opt.rect = option.rect</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> \
opt.palette = option.palette</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> \
QtGui.QApplication.style().drawControl(QtGui.QStyle.CE_PushButton, opt, \
painter)</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px">
</span></pre>
<pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px">def \
text(self):</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> return \
QtCore.QString("hi")</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px">
</span></pre>
<pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px">def \
icon(self):</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> return \
QtGui.QIcon()</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px">
</span></pre>
<pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px">def \
mousePressEvent(self, event):</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> \
self.mouse_isPressed = True</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> print \
"HELLO"</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> \
self.update()</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px">
</span></pre>
<pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px">def \
mouseReleaseEvent(self, event):</span> </pre> <pre \
style="margin-top:0px;margin-bottom:0px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> \
self.mouse_isPressed = False</span> </pre> <pre \
style="margin-top:0px;margin-bottom:10px;margin-left:84px;margin-right:80px;text-indent:0px;background-color:#eeeeee"><span \
style="font-family:'Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans \
Mono,Bitstream Vera Sans Mono,Courier New,monospace,serif';font-size:14px"> \
self.update()</span> </pre> <p
style="margin-top:0px;margin-bottom:0px;margin-left:44px;margin-right:40px;text-indent:0px"><br>
<br>
</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><br>
_______________________________________________<br>
PyQt mailing list <a
moz-do-not-send="true"
href="mailto:PyQt@riverbankcomputing.com"
target="_blank"><span
\
style="text-decoration:underline;color:#0057ae">PyQt@riverbankcomputing.com</span></a><br>
<a moz-do-not-send="true"
\
href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank"><span
\
style="text-decoration:underline;color:#0057ae">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</span></a><br>
</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><br>
</p>
<p
style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"><br>
<br>
</p>
</div>
</div>
</div>
<br>
_______________________________________________<br>
PyQt mailing list <a moz-do-not-send="true"
href="mailto:PyQt@riverbankcomputing.com"
target="_blank">PyQt@riverbankcomputing.com</a><br>
<a moz-do-not-send="true"
\
href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt"
\
target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br> \
</blockquote> </div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
PyQt mailing list <a class="moz-txt-link-abbreviated" \
href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a> <a \
class="moz-txt-link-freetext" \
href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
+-----------------------------------------------------+
> Mads Ipsen |
+----------------------+------------------------------+
> Gåsebæksvej 7, 4. tv | |
> DK-2500 Valby | phone: +45-29716388 |
> Denmark | email: <a class="moz-txt-link-abbreviated" \
> href="mailto:mads.ipsen@gmail.com">mads.ipsen@gmail.com</a> |
+----------------------+------------------------------+
</pre>
</body>
</html>
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic