問題タブ [qcursor]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - Use custom image in QCursor
I have a .bmp image that I would like to use as a cursor for my GUI. The QCursor Documentation suggests that this is possible ("To create a cursor with your own bitmap, either use the QCursor constructor which takes a bitmap and a mask or the constructor which takes a pixmap as arguments") but I can't seem to get it to work as I get 'TypeError: QCursor(): argument 1 has unexpected type 'str'' when I try to use the suggested module with my bitmap. How should this be done?
Below is a code that produces said error. The docs also suggest passing an alpha mask and two other values into QCursor but I am not sure if these are necessary and what they should be if they are.
python - カスタムのアニメーション/gif QCursor を作成する方法はありますか?
hereとhereのように長いプロセスが行われているときに、通常のカーソルに代わるカスタムアニメーションカーソルを作成しようとしていますが、たとえばgifを使用してアニメーション化したいと思います.標準Qt.WaitCursor
。これどうやってするの?アニメーション化されたシステムトレイアイコンに関するこのソリューションを見つけましたが、カーソルアイコンで動作するように適応させることができませんでした.
補足としてpm.setAlphaChannel(bm)
、最初のリンクに記載されているように実行しようとすると、うまくいかず、次のエラーが表示されます。
ドキュメントによると、QPixmapにはメソッドがあるため、これは奇妙ですsetAlphaChannel
。