Summary: | Ksysguard graphics are not filled by color under graphics lines with Qt 4.5.1 | ||
---|---|---|---|
Product: | [Applications] ksysguard | Reporter: | nucleo <nucleo> |
Component: | general | Assignee: | KSysGuard Developers <ksysguard-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | johnflux, lotusom-dev, Markus.Elfring |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
Ksysguard graphics
Qt 4.5.0 output |
Description
nucleo
2009-05-31 11:18:59 UTC
Created attachment 34142 [details]
Ksysguard graphics
graphics are not filled by color
Created attachment 34444 [details]
Qt 4.5.0 output
I've reported this to Qt as a Qt Bug 255995. ( http://www.qtsoftware.com/developer/task-tracker/index_html?id=255995&method=entry ) (In reply to comment #3) This issue tracker shows the message "Task id 255995 not found" for your link at the moment. Which topic would you like to reference in your bug report? Until qt comes back as to why old code didn't work, changed the drawing code so it now works again. http://websvn.kde.org/?view=rev&revision=1005871 You sent a simple test case to Qt for this right? Don't suppose you could attach that test case here as well? (In reply to comment #6) > You sent a simple test case to Qt for this right? Don't suppose you > could attach that test case here as well? I did but somehow same as your link above the issue id doesn't show up, I'm not sure if they have to validate it before they add it... Here is the test case I sent them, put this code in the paintevent of a qwidget. QImage img = QImage(width(),height(),QImage::Format_ARGB32_Premultiplied); QPainter p(&img); QPen pen; p.setRenderHint(QPainter::Antialiasing, true); p.setCompositionMode(QPainter::CompositionMode_Source); int x0 = 5; int x1 = 15; int y0 = 100; int y1 = 110; int bottom = height(); int mFillOpacity = 20; int iWidth = width(); qDebug() << "width:" << width(); while (x0 < iWidth) { QPainterPath path; y0 = rand() % bottom; y1 = rand() % bottom; path.moveTo(x1, y1); path.lineTo(x0, y0); QColor drawingColor = Qt::blue; drawingColor = drawingColor.lighter(); pen.setColor(drawingColor); p.strokePath(path, pen); path.lineTo(x0, bottom); path.lineTo(x1, bottom); path.lineTo(x1, y1); drawingColor = Qt::red; drawingColor.setAlpha(mFillOpacity); p.fillPath(path, drawingColor); x0 += 5; x1 += 5; } QPainter pThis(this); pThis.setCompositionMode(QPainter::CompositionMode_SourceOver); pThis.drawImage(0,0,img,0,0,0,0); |