Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- pgrouting
- mapmatching
- qgis linux
- split line
- ogrinfo
- autocad
- 아이디어
- graphhopper
- 앱개발
- QgsRubberBand
- khaiii
- PyQGIS
- 편집지적
- 스타트업
- 도로명주소일일업데이트
- nifi
- kmoran
- ODTable
- Polyline
- keypressed
- QGIS
- Circle
- qgis server
- QGIS3
- pluginbuilder
- 안드로이드
- ODField
- pbf
- 서비스
- qgis 설치
Archives
- Today
- Total
개발자 이야기
[pyqgis] shortcut for layer selection 본문
반응형
it's just a trick. it may happen side effects.
1. add keypressed event to qgsmapcanvas.
self.iface.mapCanvas().keyPressed.connect(self.step)
2. get active layers and select it
def step(event):
ascii = event.key()
seq = ascii - 49
layers = self.iface.mapCanvas().layers()
layer = layers[seq]
treeview = self.iface.layerTreeView()
treeview.setCurrentLayer(layer)
반응형
'GIS > QGIS' 카테고리의 다른 글
[pyqgis] sample of QgsSpatialIndex (0) | 2019.11.06 |
---|---|
[pyqgis] plugin builder (0) | 2019.10.31 |
[pyqgis] the ways to get layer(s) (0) | 2019.10.23 |
[QGIS] set default attributes (0) | 2019.10.08 |
[pyqgis] QGIS API references (0) | 2019.09.25 |