cinpla / exdir-browser Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
It would be awesome to be able to quickly plot the data on the right (even just the 1st minute or so) to screen that the signals look ok
This is an upstream bug in PyQt. Reported here as a reminder to fix all calls to treeView.__model.expand() when it is fixed.
Whenever we request an index from the model or get one back in the onClicked calls, it holds the wrong model internally. This causes any calls to expand or collapse to fail due to a index.model !== model check. We can work around this by calling expand on the TreeView modelAdaptor, which is accessible through the __model property.
Here is a sample code that reproduces the issue:
import ctypes
from ctypes.util import find_library
# OpenGL fix (must be set before other imports)
libGL = find_library("GL")
ctypes.CDLL(libGL, ctypes.RTLD_GLOBAL)
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtQml import *
import sys
class TreeModel(QAbstractItemModel):
def index(self, row, column, parent):
return self.createIndex(row, column, 0)
if __name__ == "__main__":
qmlRegisterType(TreeModel, "TreeModel", 1, 0, "TreeModel")
app = QApplication(sys.argv)
engine = QQmlApplicationEngine()
component = QQmlComponent(engine)
component.setData(b"""
import QtQuick 2.4
import QtQuick.Controls 1.4
import TreeModel 1.0
ApplicationWindow {
width: 1280
height: 900
visible: true
TreeModel {
id: treeModel
Component.onCompleted: {
var i = index(0, 0, 0)
console.log("Index model", i.model)
console.log("Real model", treeModel)
}
}
}
""", QUrl("test"))
window = component.create()
window.show()
# engine.load(QUrl("qml/main.qml"))
app.exec_()
General support for line and scatter plots.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.