Je veux mettre une image PNG comme arrière-plan dans QToolButton. Mais je ne suis pas en mesure d'obtenir les parties transparentes dans le bouton. Les parties transparentes sont blanches dans mon QToolButton. Quelqu'un peut-il suggérer comment enlever les parties blanches comme transparentes?comment mettre l'image PNG avec un fond transparent dans QToolButton
3
A
Répondre
4
Je suppose qu'il y a un problème avec votre fichier png. Le code suivant:
QToolButton button;
button.setIcon(QIcon("E:/delete.png"));
button.setIconSize(QSize(256, 256));
button.show();
fonctionne bien pour moi (bien sûr E: /delete.png ont un fond transparent).
Assurez-vous de sauvegarder la transparence pour votre png.
Questions connexes
- 1. GD: Rendre un fond blanc pour PNG transparent
- 2. comment faire un fond transparent avec freeimage?
- 3. fond transparent .png question de l'image dans IE6
- 4. Comment faire une surface avec un fond transparent dans pygame
- 5. Fond transparent avec un UIViewController modal
- 6. Générer PNG transparent C#
- 7. Comment créer un fond transparent pour une image PNG dans IE6?
- 8. montrant webview avec fond transparent
- 9. Création d'un coin transparent PNG dans .net
- 10. Fond transparent - pas complètement transparent
- 11. transparent PNG dans IE6 (AlphaImageLoader)
- 12. Comment créer un UITableViewCell avec un fond transparent
- 13. iphone comment faire un fond d'uitableviewcellaccessorydisclosureindicator transparent?
- 14. Comment créer un PNG truecolor transparent avec Perl & GD?
- 15. rendant transparent .png dans IE6 avec le site wordpress
- 16. Comment définir un fond transparent de JPanel?
- 17. Comment rendre un fond MdiClient transparent?
- 18. sIFR 3: Fond transparent?
- 19. Fond transparent de VerticalFieldManager
- 20. image de fond PNG dans Firefox 3.5.4
- 21. Fond transparent FrameBuffer dans OpenGL
- 22. Texte PHP GD avec fond transparent/Alpha
- 23. Div fond transparent
- 24. mode de mélange sur un fond transparent transparent et semi
- 25. DANS IE6, comment positionner PNG transparent en utilisant un filtre?
- 26. Fond IE et transparent
- 27. Fond transparent, texte clair?
- 28. Fond transparent Iframe
- 29. Un widget qt avec un fond entièrement transparent
- 30. En cliquant sur un .png transparent