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

QPainter setOpacity 1.0 makes widget dissapear

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 5.15
    • GUI: Painting
    • None
    • Windows x64
      Linux x64
    • All

    Description

      According to documentation QPainter setOpacity accepts a qreal between 0.0 and 1.0.

      When I render my widget with opacity 1.0, it becomes transparent. Setting opacity to 0.999 instead works fine.

      I asume something could be wrong with handling qreal type. If my 1.0 is considered out of range, I think it should fallback to the maximum value, not to the minimum.
       

      QPainter painter(this);     
      painter.setOpacity(1.0);

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vgt Eirik Aavitsland
            danividanivi Daniel Viaño
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes