Skip to content

Font size menu actions w/ pixel size #1304

@zdomke

Description

@zdomke

Describe the bug

My application has defines fonts using pixel size instead of point size. When I change the font size using the menu actions I get an error similar to the one below:
QFont::setPointSizeF: Point size <= 0 (-0.000000), must be greater than 0

Steps to reproduce

  1. Use a stylesheet for the app that defines a font-size as a pixel size:
    font-size: 12px
  2. Attempt to increase/decrease/reset the font size (Ctrl+= / Ctrl+- / Ctrl-0)
  3. Notice the errors printed to terminal

Expected behavior

The font should change and there should be no errors printed to terminal.

Operating System.

Linux

OS Version Details.

No response

Python Version

Python 3.12.11

Packages Version

PyDM: 1.27.1

Additional context.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions