https://bugs.kde.org/show_bug.cgi?id=473429

--- Comment #1 from varkatope <chirn...@hotmail.com> ---
(In reply to varkatope from comment #0)
> Or a section on the
> start screen that is addressable from Python, where you can register a
> widget (even just a single button would be enough to launch a new project
> creation window). Or, something like Maya's custom "shelf" where you can pin
> scripts to it, which would be part of the standard UI and therefore
> persistent (like the new document, open existing document, save, etc.
> section at the top left). I dunno, I'm just spitballing now.

Well, I managed to add a new QToolBar and QToolButton to the main window from
within my docker plugin, which would do the trick, but that took some doing
because on first load, the qwindow() doesn't exist yet and will throw an error
unless you use a Notifier for windowCreated. Then I wanted to only have it
appear on the start screen since once the Docker is loaded I can just go from
there, but then if I started a few new projects I would end up with multiple
QToolButtons in the tool bar, so I had to start and stop Notifiers for
imageCreated and imageClosed to activate and deactivate the tool bar depending
on what was open or closed, which still isn't working quite right but at least
I only have one QToolButton at any one time, and it didn't look right so I had
to use addAction instead of addWidget and then
setStyleSheet('QToolBar{border:none}') and it finally looks OK, BUT THEN I
managed to insert a tool button into the "Start" area and that presented its
own set of challenges, plus it could break at any time if y'all decide to
rename 'verticalLayout_4', for example, but at least I don't have to mess with
the other Notifiers, so that's probably what I'm going to stick with for the
moment and hope it doesn't break in future versions...

My point is that it would be cool to have some sort of helper function in
Krita's API for plugin developers that would simplify adding either a tool bar
to the qwindow() or tool button to the welcome page now that there is one (or
both!), and to inherit the style of the existing UI by default (no border if
QToolBar, or setAutoRaise(True), QSize(48,48), setToolButtonStyle(3) if
QToolButton, that sort of thing), because I'm pretty "in the weeds" on the Qt
side at the moment and it stings a bit.

Sorry for the non-"bugreportyness" of this "bug report." Do with it what you
will.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to