![]() The menu is created as before, but adding 3 actions for the different output formats. This application doesn't do anything yet, so in the next part we'll expand this example to create a mini colour-picker.Ĭolor.hue(), color.saturation(), color.value()Ī(copy_color_hex)Ī(copy_color_rgb)Ī(copy_color_hsv)Īs in the previous example there is no QMainWindow for this example. The system tray icon shown on the menu bar (as a poo emoticon)Ĭlicking on the icon shows the added menu. The provided icon shows up in the toolbar (you can see it on the left). Setting `app.setQuitOnLastWindowClosed(False)` stops this and will ensure your application keeps running. This won't affect this toy example, but will be an issue in application where you do create windows and then close them. The default behaviour in Qt is to close an application once all the active windows have closed. You'll need an icon for this example - I recommend the fugue icon set. ![]() You can create a window as normal without affecting the behaviour of the system tray icon. You'll notice that there isn't a QMainWindow, simply because we don't actually have any window to show.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |