EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: QT-based tools: Expressions of interest requested
From: Matt Newville <[email protected]>
To: Emmanuel Mayssat <[email protected]>
Cc: [email protected]
Date: Thu, 23 Feb 2012 14:29:09 -0600
Hi Emmanuel,

On Thu, Feb 23, 2012 at 11:48 AM, Emmanuel Mayssat <[email protected]> wrote:
> Ian,
>
> It seems they are more and more people using Qt.... Great!
> We use pyqt here. Would love to be part of a collaboration to develop
> more...
> Do you have a pointer to your pyqt interface to epics?
>
> Regards,
> --
> Emmanuel

Sorry to jump into this tangent of the Qt conversation.  I have very
little experience with Qt, but a simple probe-like application (see
below) to connect Qt with Epics through python is remarkably simple.
I'd be happy to add  "epics-aware" Qt widgets to pyepics, but don't
know enough Qt to do this myself.

--Matt Newville

This is using pyside, tested on Windows only.

#!/usr/bin/env python
import epics
import sys
from PySide.QtGui import QWidget, QLabel, QLineEdit, QGridLayout, QApplication

class PVProbe(QWidget):
    def __init__(self, parent=None):
        QWidget.__init__(self, parent)

        name_label  = QLabel("PV Name:")
        self.pvname = QLineEdit()
        value_label = QLabel("PV Value:")
        self.value  = QLabel("    ")

        self.pvname.returnPressed.connect(self.onPVNameReturn)
        self.pv = None

        grid = QGridLayout()
        grid.addWidget(name_label,   0, 0)
        grid.addWidget(self.pvname,  0, 1)
        grid.addWidget(value_label,  1, 0)
        grid.addWidget(self.value,   1, 1)

        self.setLayout(grid)
        self.setWindowTitle("PySide PV Probe:")

    def onPVNameReturn(self):
        self.pv = epics.PV(self.pvname.text(), callback=self.onPVChange)

    def onPVChange(self, pvname=None, char_value=None, **kws):
        self.value.setText(char_value)

if __name__ == '__main__':
    app = QApplication(sys.argv)
    probe = PVProbe()
    probe.show()
    sys.exit(app.exec_())

Replies:
Re: QT-based tools: Expressions of interest requested Ernest L. Williams Jr.
Re: QT-based tools: Expressions of interest requested Pete Jemian
Re: QT-based tools: Expressions of interest requested Emmanuel Mayssat
References:
QT-based tools: Expressions of interest requested Andrew Johnson
RE: QT-based tools: Expressions of interest requested ian.gillingham
Re: QT-based tools: Expressions of interest requested Emmanuel Mayssat

Navigate by Date:
Prev: Re: QT-based tools: Expressions of interest requested Faucett, John A
Next: Re: Search for disconnected channels Ernest L. Williams Jr.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: QT-based tools: Expressions of interest requested Emmanuel Mayssat
Next: Re: QT-based tools: Expressions of interest requested Ernest L. Williams Jr.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·