システム トレイに現在の時刻を表示するデジタル時計を作成したいだけです。
QPainter を使用してアイコンを描画し、それを QSystemTrayIcon オブジェクトに設定できますが、アイコンのサイズは常に 22x22 ピクセルです。
これを達成するにはどうすればよいですか。PyGTK は単にトレイ アイコン オブジェクトにラベルを追加できることを知っています。
システム トレイに現在の時刻を表示するデジタル時計を作成したいだけです。
QPainter を使用してアイコンを描画し、それを QSystemTrayIcon オブジェクトに設定できますが、アイコンのサイズは常に 22x22 ピクセルです。
これを達成するにはどうすればよいですか。PyGTK は単にトレイ アイコン オブジェクトにラベルを追加できることを知っています。
"Icon was resized to 22x22 pixels", I will assume that you are running your application on X11-based system (Ubuntu or other linux distribution.)
In QSystemTrayIcon doc, it says that your icon will be resized according to OS you use:
On Windows, the system tray icon size is 16x16; on X11, the preferred size is 22x22. The icon will be scaled to the appropriate size as necessary
You can still workaround this by:
This workaround is prone to error, because icons may be shown in the wrong order. If X11 is your only target platform, I would strongly recommend you to use pygtk.