Topics

Note Selector

Fix ComboBox Arrow

Tuesday, January 8, 2019

Applying SVG images to the arrow image via the ComboBox's stylesheet does not seem simple, and the only implementation that I could originally come up with required the SVG image to first be saved to the disk and then the URL for the file passed to the stylesheet. I could not find a way to use a preloaded image stored as a variable and pass that along to the stylesheet. I found the need to store and load the image to be impractical, so I knew I needed another solution.

Since the ComboBox is really just a transparent QComboBox being drawn on top of a Widget, it would make sense to draw the arrow between them.

Picture of ComboBox Arrow Diagram

I would also like the arrow image hover color to enable anytime the mouse hovers over the ComboBox, not just when hovering over the arrow.