Re: [PyQt] Kled module

2013-06-27 Thread Phil

On 26/06/13 19:47, David Boddie wrote:


Just out of interest, was the problem to do with getting PyQt and PyKDE to
work together? This example shows how PyKDE widgets, like KLed, and
PyQt widgets, like QWidget, can be mixed in an application:



Yes, David, that was the problem. Thanks for the example, I'll have 
another play when I get a chance.


--
Regards,
Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Kled module

2013-06-26 Thread David Boddie
On Tue Jun 25 23:55:53 BST 2013, Phil wrote:

 On 25/06/13 22:34, Robert Kent wrote:
  Hi Phil,
 
  I don't know about using Kled, but I have an LED widget written in pure
  python/PyQt4 which may suit your needs. You can download it from my
  google code page here:
 
  https://code.google.com/p/gulon-soft/downloads/list
 
 Thank you Robert, Oliver and Detlev.
 
 I'm keen to have a look at your LED project Robert and I'll see if I can 
 find the LED project suggested by Detlev.
 
 I briefly played with PyKDE module Oliver but I couldn't relate the 
 PyKDE code with either PyQt or PySide.

Just out of interest, was the problem to do with getting PyQt and PyKDE to
work together? This example shows how PyKDE widgets, like KLed, and
PyQt widgets, like QWidget, can be mixed in an application:

  #!/usr/bin/env python

  import sys

  from PyQt4.QtGui import QVBoxLayout, QWidget
  from PyKDE4.kdecore import ki18n, KAboutData, KCmdLineArgs
  from PyKDE4.kdeui import KApplication, KLed

  if __name__ == __main__:

  about = KAboutData(LED, , ki18n(LED), 1.0, ki18n(LED example))
  args = KCmdLineArgs.init(sys.argv, about)
  app = KApplication()

  led = KLed()
  w = QWidget()
  l = QVBoxLayout(w)
  l.addWidget(led)
  w.show()

  sys.exit(app.exec_())

Note that the KLed class appears to cause a crash when the application
exits if it hasn't been placed in another widget; in this case, we use a
QWidget.

David
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Kled module

2013-06-25 Thread Robert Kent
Hi Phil,

I don't know about using Kled, but I have an LED widget written in pure
python/PyQt4 which may suit your needs. You can download it from my google
code page here:

https://code.google.com/p/gulon-soft/downloads/list

Just unpack the zipped tar file and run (sudo) python setup.py install as
standard. 

The package itself contains a demo which you can run by executing python -m
QLed once its installed and shows the different shapes and colours
available. I'm afraid I haven't got around to writing any docs for it yet
but the code itself and the demo implementation at the bottom of the source
file should see you right. Please email me with any questions.

Hope this helps,
Rob


On 25/06/2013 00:20, Phil phil_...@bigpond.com wrote:

 Thank you for reading this.
 
 I'd like to include a led in my project which I've done in the past with
 Qt creator and Designer under C++. Adding the following to my Python
 project fails because there is no module named Kled.
 
 self.kled = KLed(self.centralwidget)
 
 Is it possible to add a Kled to a PyQt project?
 
 -- 
 Regards,
 Phil
 ___
 PyQt mailing listPyQt@riverbankcomputing.com
 http://www.riverbankcomputing.com/mailman/listinfo/pyqt
 


___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Kled module

2013-06-25 Thread o.fourn...@perigord.com
Hi,

You would use pykde

olivier
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Re: [PyQt] Kled module

2013-06-25 Thread Detlev Offenbach
Hello,

you may download the eri sources and use the LED I implemented in pure 
Python.

Detlev

On Tuesday 25 June 2013, 09:20:15 Phil wrote:
 Thank you for reading this.
 
 I'd like to include a led in my project which I've done in the past with
 Qt creator and Designer under C++. Adding the following to my Python
 project fails because there is no module named Kled.
 
 self.kled = KLed(self.centralwidget)
 
 Is it possible to add a Kled to a PyQt project?-- 
*Detlev Offenbach*
det...@die-offenbachs.de
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Re: [PyQt] Kled module

2013-06-25 Thread Phil

On 25/06/13 22:34, Robert Kent wrote:

Hi Phil,

I don't know about using Kled, but I have an LED widget written in pure
python/PyQt4 which may suit your needs. You can download it from my
google code page here:

https://code.google.com/p/gulon-soft/downloads/list


Thank you Robert, Oliver and Detlev.

I'm keen to have a look at your LED project Robert and I'll see if I can 
find the LED project suggested by Detlev.


I briefly played with PyKDE module Oliver but I couldn't relate the 
PyKDE code with either PyQt or PySide.


--
Regards,
Phil
___
PyQt mailing listPyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt