MCPcopy Index your code
hub / github.com/PyQt5/PyQt / test

Method test

PyQtGraph/testGraphAnalysis.py:54–89  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

52 item.child(index).setCheckState(0, Qt.Unchecked)
53
54 def test(self):
55
56 tab1 = QWidget()
57 scrollArea = QScrollArea(tab1)
58 scrollArea.setMinimumSize(650, 550)
59 scrollArea.setWidgetResizable(True)
60
61 labelsContainer = QWidget()
62 labelsContainer.setMinimumSize(0, 3000 + 200)
63 scrollArea.setWidget(labelsContainer)
64 layout = QVBoxLayout(labelsContainer)
65
66 time = ['2019-04-20 08:09:00', '2019-04-20 08:09:00', '2019-04-20 08:09:00', '2019-04-20 08:09:00']
67 value = [1.2, 2, 1, 4]
68 xdict = dict(enumerate(time))
69 ticks = [list(zip(range(4), tuple(time)))]
70 for i in range(11):
71 vb1 = CustomViewBox()
72 plt1 = pg.PlotWidget(title="Basic array plotting%s" % i, viewBox=vb1)
73 plt1.resize(500, 500)
74 plt1.setBackground(background=None)
75 plt1.plot(list(xdict.keys()), value)
76 plt1.getPlotItem().getAxis("bottom").setTicks(ticks)
77 temp1 = QWidget()
78 temp1.setMinimumSize(600, 300)
79 temp1.setMaximumSize(600, 300)
80 layout2 = QVBoxLayout(temp1)
81 layout2.addWidget(plt1)
82 layout.addWidget(temp1)
83 spacerItem = QSpacerItem(20, 40, QSizePolicy.Minimum,
84 QSizePolicy.Expanding)
85 layout.addItem(spacerItem)
86 # print(layout.count())
87 self.tabWidget.addTab(tab1, '12')
88 for i in range(self.tabWidget.count()):
89 self.tabWidget.widget(i)
90
91
92if __name__ == "__main__":

Callers

nothing calls this directly

Calls 8

setWidgetMethod · 0.80
keysMethod · 0.80
addWidgetMethod · 0.80
CustomViewBoxClass · 0.70
resizeMethod · 0.45
setBackgroundMethod · 0.45
addItemMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected