I changed my code to use Qt instead of HTML.
While most of the Qt is straightforward and manageable, I still have issue adding button with an image icon.
Maybe you can provide example of how to assign an icon to a Qt button?
I would like to get the image icon from a snapshot of main window, then assign it to a certain pushButton.
After that, get another snapshot and assign it to different pushbutton, etc.
Comments
Hi Itamar,
the browser approach is not well suited for doing interactive dialogs with more than just links.
The "custom dialog" example https://klayout.de/rba_examples.html#example8 shows a simple example. You need some knowledge about Qt however.
Matthias
I changed my code to use Qt instead of HTML.
While most of the Qt is straightforward and manageable, I still have issue adding button with an image icon.
Maybe you can provide example of how to assign an icon to a Qt button?
Thanks much,
Hi Itamar,
where do you want to get the image icon from?
The usual Qt way is to use resource files. There is a discussion about using resource files and KLayout's Qt binding here in the forum: http://klayout.de/forum/comments.php?DiscussionID=636.
Regards,
Matthias
I would like to get the image icon from a snapshot of main window, then assign it to a certain pushButton.
After that, get another snapshot and assign it to different pushbutton, etc.
Thanks,
Hi,
If you mean a layout snapshot, then
LayoutView#get_image
is the method you are looking for.I don't know precisely what you plan to do, but here is some code to play with:
Matthias