Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-112502

QFont::StyleStrategy bits can't be OR'd

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.4.2
    • GUI: Font handling
    • None

    Description

      The `QFont::StyleStrategy` type values can't be OR'd together, although the values are flag values and the documentation does mention OR'ing them.

       

      font.setStyleStrategy(QFont::NoAntialias | QFont::NoSubpixelAntialias) 

      When compiled with MinGW GCC, yields the error:

      circuits.cpp:171:46: error: invalid conversion from 'int' to 'QFont::StyleStrategy' [-fpermissive]
        171 |     font.setStyleStrategy(QFont::NoAntialias | QFont::NoSubpixelAntialias);
            |                           ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
            |                                              |
            |                                              int

      Attachments

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            jasonc Jason Cipriani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: