[PyQt] Code in emails (was: Re: findChildren: setting visibility problems)

Marcus Ottosson konstruktion at gmail.com
Tue Oct 14 06:40:35 BST 2014


Hey Florian,

Yeah, I seemed to have copied the end of mail indicator along with his code
snippet, and it’s also possible that those of you without support for HTML
in emails won’t see any benefit either. How about this?

def toggleVis(self):
  self.results = findChildren((QLabel,QGroupBox))
  print self.results
  for w in self.results:
    w.setVisible(not w.isVisible())

There’s a few of us using it in the Maya-Python mailing list, for example,
here: https://groups.google.com/forum/#!topic/python_inside_maya/sQ6Tb45CKrw

And it’s quite helpful, especially for lists with lots of code examples. As
for attachments, I’d agree, if it wasn’t for the ease of just seeing it in
context with the rest of the mail.

Anyway, just thought I’d share.

Best,
Marcus
​

On 13 October 2014 21:24, Florian Bruhin <me at the-compiler.org> wrote:

> * Marcus Ottosson <konstruktion at gmail.com> [2014-10-13 20:25:46 +0100]:
> > Just a small tip, there’s a plug-in for chrome and firefox that does code
> > highlighting in emails and google groups.
> >
> >    - http://markdown-here.com/
> >
> > It looks like this:
> >
> > import sysfrom PyQt4 import QtGui, QtCore
>
> Either that plugin or your mail client is messing with newlines and
> indentation in that code. The best syntax highlighting won't help if
> the code is broken ;)
>
> I suggest either being very sure about what's going on (and you can't
> realistically do that in a webmail client), or attaching code as an
> attachment, like also mentioned at
> http://www.riverbankcomputing.com/support/help
>
> Florian
>
> --
> http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
>              GPG 0xFD55A072 | http://the-compiler.org/pubkey.asc
>          I love long mails! | http://email.is-not-s.ms/
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>



-- 
*Marcus Ottosson*
konstruktion at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20141014/5c8df58e/attachment.html>


More information about the PyQt mailing list