Skip to content

Commit 415dc5e

Browse files
committed
plugin template fixes
1 parent bcdb42d commit 415dc5e

File tree

6 files changed

+32
-6
lines changed

6 files changed

+32
-6
lines changed

plugindevtools/PluginDevTools/PluginDevToolsWidget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __init__(self):
3838
"Inspector: Use the Event and Signal Viewer/Debugger to latch onto signals and events, be aware some events are only visible at QApplication level so if you see events missing, change widget.installEventFilter to QApplication.installEventFilter under Events",
3939
"Inspector: Some fields like QString, bools, int, QSize and other can be modified in realtime by double clicking the value field as long as the field has a corresponding 'set', such as 'height' can be changed because 'setHeight' exists",
4040
"Console: Use your favorite text editor as your Scripter using the buttons on the top right",
41-
"To easily create a plugin with a template, go to Tools->Scripts->PluginDevTools"
41+
"To easily create a plugin with a template, go to Tools->Scripts->PluginDevTools->Create your own new plugin generator..."
4242
]
4343

4444
self.kritaAPI = {}

plugindevtools/PluginDevTools/PluginGeneratorTemplates/BlankDocker/[SHORTNAME].py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
import krita
12
try:
3+
if int(krita.qVersion().split('.')[0]) == 5:
4+
raise
25
from PyQt6.QtWidgets import *
36
except:
47
from PyQt5.QtWidgets import *

plugindevtools/PluginDevTools/PluginGeneratorTemplates/SimpleDockerGUI/[SHORTNAME].py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
import krita
12
try:
3+
if int(krita.qVersion().split('.')[0]) == 5:
4+
raise
25
from PyQt6.QtWidgets import *
36
except:
47
from PyQt5.QtWidgets import *

plugindevtools/PluginDevTools/PluginGeneratorTemplates/SimpleDockerGUIQML/[SHORTNAME].py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1+
import krita
2+
import os
13
try:
4+
if int(krita.qVersion().split('.')[0]) == 5:
5+
raise
6+
from PyQt6 import uic
27
from PyQt6.QtWidgets import *
38
except:
9+
from PyQt5 import uic
410
from PyQt5.QtWidgets import *
11+
512
'''[%AUTOCOMPLETE%]'''
6-
try:
7-
from PyQt6 import uic
8-
except:
9-
from PyQt5 import uic
1013

1114
class '''[%SHORTNAME%]'''(DockWidget):
1215

plugindevtools/PluginDevTools/PluginGeneratorTemplates/SimpleExtensionDialogGUI/[SHORTNAME].py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
import krita
2+
try:
3+
if int(krita.qVersion().split('.')[0]) == 5:
4+
raise
5+
from PyQt6 import uic
6+
from PyQt6.QtWidgets import *
7+
except:
8+
from PyQt5 import uic
9+
from PyQt5.QtWidgets import *
10+
111
'''[%AUTOCOMPLETE%]'''
212

313
class '''[%SHORTNAME%]'''Dialog(QDialog):

plugindevtools/PluginDevTools/PluginGeneratorTemplates/SimpleExtensionDialogGUIQML/[SHORTNAME].py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
'''[%AUTOCOMPLETE%]'''
1+
import krita
2+
import os
23
try:
4+
if int(krita.qVersion().split('.')[0]) == 5:
5+
raise
36
from PyQt6 import uic
7+
from PyQt6.QtWidgets import *
48
except:
59
from PyQt5 import uic
10+
from PyQt5.QtWidgets import *
11+
12+
'''[%AUTOCOMPLETE%]'''
613

714
class '''[%SHORTNAME%]'''Dialog(QDialog):
815

0 commit comments

Comments
 (0)