12
votes

How can I add some thumbnail toolbar buttons to a QMainWindow with PyQt4, without using native code (ctypes and similar are fine, but not creating a DLL from another language)?

I'd prefer a solution that doesn't break the platform independence of my application (i.e. on Linux it should just do nothing).

Thumbnail Toolbar
(source: microsoft.com)

1
have a look at this answer and then read the microsoft article on the subject.vikki
Thanks, I'll try... Do you know how does this behave on Windows XP/Vista?Lord Spectre
I cannot compile the TLB because I'm developing under Linux and I don't have admin rights on the Windows 7 machine I use for testing. Can you compile the file in the previous answer for me? ThanksLord Spectre
I honestly don't know how this behaves in xp/vista, I'd guess that it fails silently. For the tlb just Google taskbar.tlb, you'll find a bunch of github repos that are using it and you can try those. I currently don't have the Windows 7sdk installed but I can do it if the other option fails. just let me know.vikki
Thanks, it works. On XP CreateObject throws a WindowsError, which I catch and ignore. I managed to set the progress bar, but now I have trouble passing non-Python types to ITaskbarList3 functions, specifically HICON, LPTHUMBBUTTON and RECT*. Do you know a soultion?Lord Spectre

1 Answers