How to develop/create a GUI for a QuickLook plugin

2019-03-21 13:08发布

问题:

I saw lots of QuickLook plugins (like BetterZip Quick Look Generator) coming together with their nice and tidy interfaces...I tried to design the GUI of my own one using HTML and JQuery, but I don't think that it's a good solution (plus, on top of that, Xcode 5.1 doesn't allow you anymore to include or open files from other directories with the <src> attribute).

I'll never thank enough Jelle Vandebeeck for opening my mind with his beautiful and helpful post, but unfortunately there's nothing on the internet regarding this topic (I think that there might be something on The Big Nerd Ranch Guide, but it won't be out before October).

So, I was wondering if anybody of you:

OPTION A - Knows the title of a guide that can explain how to develop/create a GUI for my QuickLook plugin in a "didactic" way (like a text book, step-by-step);

OPTION B - Could write down in the answer a couple of code lines to insert a button and a text field with the usual "Hello World!".

I have a sub-question related to the main one: is it possible to keep the semi-transparent white/grey background colour that a QuickLook window (like the one that appears when you select -for example- an audio file) usually has?

Thank you so much in advance!

回答1:

In terms of a guide, there's the QuickLook Programming Guide over in the documentation. It goes over the architecture of QuickLook and walks you through the various steps of building a QuickLook plugin, including one that returns rich HTML content.

Related to this are a couple of pieces of documentation on how to integrate QuickLook into your own app, but it sounds like you're more interested in the plugin aspect.