[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyQt] activated signal
From:       Mads Ipsen <madsipsen () gmail ! com>
Date:       2012-02-17 8:58:02
Message-ID: 4F3E169A.5010600 () gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,

I have a QTableView. If I connect with

   self.connect(self.table, QtCore.SIGNAL('activated(const QModelIndex 
&)'), self.tableActivated)

the method tableActivated() is *not* called when I double-click a cell 
or enter via space press etc.

However, if I do

   self.connect(self.table, QtCore.SIGNAL('doubleClicked(const 
QModelIndex &)'), self.tableActivated)

the method is called when a cell is double-clicked.

What am I doing wrong?

Mads



-- 
+-----------------------------------------------------+
| Mads Ipsen                                          |
+----------------------+------------------------------+
| Gåsebæksvej 7, 4. tv |                              |
| DK-2500 Valby        | phone:          +45-29716388 |
| Denmark              | email:  mads.ipsen@gmail.com |
+----------------------+------------------------------+



[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <font face="Bitstream Vera Sans Mono">Hi,<br>
      <br>
      I have a QTableView. If I connect with<br>
      <br>
      &nbsp; self.connect(self.table, QtCore.SIGNAL('activated(const
      QModelIndex &amp;)'), self.tableActivated)<br>
      <br>
      the method </font><font face="Bitstream Vera Sans Mono">tableActivated()
      is <b>not</b> called when I double-click a cell or enter via
      space press etc.<br>
      <br>
      However, if I do<br>
      <br>
    </font><font face="Bitstream Vera Sans Mono">&nbsp;
      self.connect(self.table, QtCore.SIGNAL('doubleClicked(const
      QModelIndex &amp;)'), self.tableActivated)<br>
      <br>
      the method is called when a cell is double-clicked.<br>
      <br>
      What am I doing wrong?<br>
      <br>
      Mads<br>
      <br>
      <br>
    </font><br>
    <pre class="moz-signature" cols="72">-- 
+-----------------------------------------------------+
> Mads Ipsen                                          |
+----------------------+------------------------------+
> G&aring;seb&aelig;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