Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. OSX 10.8.4 and artifacts with WA_TranslucentBackground & FramelessWindowHint
Forum Updated to NodeBB v4.3 + New Features

OSX 10.8.4 and artifacts with WA_TranslucentBackground & FramelessWindowHint

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Chestnut
    wrote on last edited by
    #1

    Prior to switching to QT5.1 I was getting artifacts on Windows. Since switching I'm getting artifacts on OSX :( I see lots of threads and bugs on this, but nothing that details the problems I'm currently seeing on OSX. In my app I have QWidget that is WA_TranslucentBackground & FramelessWindowHint. It hosts a QFrame with a nine-slice image with rounded corners and gradient to transparent at the edges. It looks terrible on Mac. But I'm reproducing (intermittently and with random severity) the artifacts with the simplified code below:

    #include <QApplication>
    #include <QtGui>
    #include <QGraphicsScene>
    #include <QGraphicsView>
    #include <QLabel>
    #include <QWidget>

    int main(int argc, char *argv[])
    {
    QApplication a(argc, argv);

    QWidget* container = new QWidget();
    container->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::NoDropShadowWindowHint);
    container->setAttribute(Qt::WA_TranslucentBackground, true);
    
    QLabel* label = new QLabel("Artifacts around me", container);
    container->show();
    
    return a.exec(&#41;;
    

    }

    Any suggestions for a workaround or QT patch?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Did you check the "bug report system":http://bugreports.qt-project.org to see whether it's a known problem ?

      If not, you could consider creating a new report with this minimal example.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • G Offline
        G Offline
        grizzancs
        wrote on last edited by
        #3

        I successfully removed my artifacts via

        paintEvent(QPaintEvent *)
        {
        QPainter painter(this); painter.setCompositionMode(QPainter::CompositionMode_Clear);
        painter.setBrush(Qt::black);
        painter.drawRect(rect);
        painter.setCompositionMode(QPainter::CompositionMode_SourceOver);

        (...)

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved