개정판 5ac97832
pdf connector on
Change-Id: I95d452c2d4b6e0a7de4a673ff6002fc10bbef1c1
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
1226 | 1226 |
|
1227 | 1227 |
scene = self.graphicsView.scene() |
1228 | 1228 |
|
1229 |
for item in scene.items(): |
|
1230 |
if not hasattr(item, 'connectors'): continue |
|
1231 |
for connector in item.connectors: connector.setVisible(False) |
|
1229 |
#for item in scene.items():
|
|
1230 |
# if not hasattr(item, 'connectors'): continue
|
|
1231 |
# for connector in item.connectors: connector.setVisible(False)
|
|
1232 | 1232 |
|
1233 | 1233 |
canvasRect = scene.sceneRect() # or canvasRect = scene.border.boundingRect() |
1234 | 1234 |
source = canvasRect |
... | ... | |
1237 | 1237 |
scene.render(painter, target, source) |
1238 | 1238 |
painter.end() |
1239 | 1239 |
|
1240 |
for item in scene.items(): |
|
1241 |
if not hasattr(item, 'connectors'): continue |
|
1242 |
for connector in item.connectors: connector.setVisible(True) |
|
1240 |
#for item in scene.items():
|
|
1241 |
# if not hasattr(item, 'connectors'): continue
|
|
1242 |
# for connector in item.connectors: connector.setVisible(True)
|
|
1243 | 1243 |
|
1244 | 1244 |
except Exception as ex: |
1245 | 1245 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
내보내기 Unified diff