pydm | Python Display Manager | Application Framework library
kandi X-RAY | pydm Summary
kandi X-RAY | pydm Summary
PyDM is a PyQt-based framework for building user interfaces for control systems. The goal is to provide a no-code, drag-and-drop system to make simple screens, as well as a straightforward Python framework to build complex applications. « Explore PyDM docs and tutorials » Report bug · Request feature · How to Contribute · Support.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Return a dict containing the command - line arguments
- Return a ConfigParser instance from root
- Get project root directory
- Extract version information from the VCS
- Write a message to the text
- Setup the UI layout
- Get the stylesheet
- Return the icon for the given name
- Set the stylesheet
- Register a widget
- Get widgets from entrypoints
- Overrides paint event
- Fetch data from the archive
- Enable crosshair
- Load image files
- Get data source
- Update the image
- Receive data from the archive
- Receive an image waveform
- Set the channel
- Paint the widget
- Parse a macro string
- Extract the version information
- Create the versioneer config file
- Setup the UI
- Set the filename
- Draw the item
pydm Key Features
pydm Examples and Code Snippets
class DisplayFormat:
DEFAULT = 0
STRING = 1
DECIMAL = 2
EXPONENTIAL = 3
HEX = 4
BINARY = 5
class PyDMLabel(QLabel, PyDMWidget, DisplayFormat):
DisplayFormat = DisplayFormat
Q_ENUMS(DisplayFormat)
Community Discussions
Trending Discussions on pydm
QUESTION
I am creating a custom widget that inherits from QLabel
, and I would like to have a property on my widget to represent how the data must be formatted when presenting to the user.
For that I am trying to use Q_ENUMS
, but I'm not having much success. I can get the property to show in Designer, but the UI file saved shows the enum as PyDMLabel::STRING
and not as I would expect DisplayFormat::STRING
.
Here is my code for the widget:
...ANSWER
Answered 2017-Oct-24 at 20:54In order for Qt (Designer) to see an enum, PyQt has to add it to the meta-object of the custom class. So it could never be referred to by Qt as DisplayFormat::STRING
.
In Qt, enums declared in the class scope expose their constants as members of the class. So for example, the QComboBox class defines an InsertPolicy enum, and the constants can be referred to like this: QComboBox::InsertAtTop
. So in that respect, the behaviour of PyQt Q_ENUMS
in Qt Designer plugins is exactly as expected, since the ui file shows PyDMLabel::STRING
.
However, getting fully equivalent behaviour in Python code requires some extra work. The nearest I could come up with is this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pydm
You can use pydm like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page