Accepting request 933924 from home:bnavigator:branches:devel:languages:python:numeric
- Update to 0.1.31 * Fix order of columns after undo * Fix pasting of data with existing column names * Avoid empty trailing row after pasting OBS-URL: https://build.opensuse.org/request/show/933924 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-python-qdatamatrix?expand=0&rev=5
This commit is contained in:
22
example.py
22
example.py
@@ -24,14 +24,22 @@ import sys
|
||||
from qtpy import QtWidgets
|
||||
import qtpy
|
||||
|
||||
dm = DataMatrix(length=3)
|
||||
dm.col1 = 1, 2, 3
|
||||
dm.col2 = 'a', 'b', 'c'
|
||||
print(dm)
|
||||
|
||||
def show():
|
||||
print(qdm._dm)
|
||||
for n, c in qdm._dm.columns:
|
||||
print(n, repr(c._rowid))
|
||||
|
||||
|
||||
dm = DataMatrix(length=4)
|
||||
dm.sorted = False
|
||||
dm.col1 = range(4)
|
||||
dm.col3 = ['a', 'b', 'c', 'd']
|
||||
dm.col2 = ['e', 'f', 'g', 'h']
|
||||
print(dm)
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
qdm = QDataMatrix(dm)
|
||||
qdm.resize(600,400)
|
||||
# qdm.refresh()
|
||||
qdm = QDataMatrix(dm, read_only=False)
|
||||
qdm.resize(600, 400)
|
||||
qdm.changed.connect(show)
|
||||
qdm.show()
|
||||
sys.exit(app.exec_())
|
||||
|
||||
Reference in New Issue
Block a user