Groups
Groups
Sign in
Groups
Groups
QGIS初心者質問グループ
Conversations
About
Send feedback
Help
プログレスバーの表示処理
145 views
Skip to first unread message
滝澤怜
unread,
Mar 14, 2022, 6:49:58 AM
3/14/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to QGIS初心者質問グループ
現在QGIS3.16で開発を行っています。
プラグインでプログレスバーの処理を開発中です。
プログレスバーを動かす方法を知りたいです。
よろしくお願いします。
〇表示されるダイアログ
〇プログレスバーの表示処理
def processTextMessage(self):
QgsApplication.restoreOverrideCursor()
dialog = QProgressDialog('test', 'Cancel', 0, 100)
dialog.setWindowTitle("test")
dialog.setLabelText("test")
dialog.setWindowModality(Qt.WindowModal)
bar = QProgressBar(dialog)
bar.setTextVisible(True)
bar.maximum=len(commandValues)
bar.setValue(0)
dialog.setBar(bar)
dialog.show()
for i in range (1, 101):
time.sleep(0.35)
if dialog.wasCanceled():
break
ありた
unread,
Mar 14, 2022, 8:18:52 AM
3/14/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to QGIS初心者質問グループ
こんにちは
プラグインをはじめ、 GUI プログラミングの経験が乏しいため憶測になりますが
マルチスレッド等の機構を組み込むことで回避できそうな気はします。
Python や Qt に関する情報を調べてみてください。
また、見本とするプラグインがあるのならばソースを読んでみてください。
ありた
unread,
Mar 14, 2022, 8:40:02 AM
3/14/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to QGIS初心者質問グループ
あとは、以下の情報なども参考にしてみてください。
https://docs.qgis.org/3.16/ja/docs/pyqgis_developer_cookbook/tasks.html
https://gis-ops.com/qgis-3-plugin-tutorial-background-processing/
Reply all
Reply to author
Forward
0 new messages