Re: [Interest] QPainter::drawRect incorrectly "rounds" corners
Il 21/10/20 20:11, Matthew Woehlke ha scritto: Yes (although there's a related story there; sigh). Turns out the default corner style is... unhelpful. Ick. I still think there's a bug; the corners should at least all be the same... This might be QTBUG-25896 (cf. https://codereview.qt-project.org/c/qt/qtbase/+/200383 which unfortunately has been reverted). HTH, -- Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com KDAB - The Qt, C++ and OpenGL Experts smime.p7s Description: Firma crittografica S/MIME ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] QPainter::drawRect incorrectly "rounds" corners
On 21/10/2020 13.16, David M. Cotter wrote: are your pixels specified in floating point? have you accounted for the half-pixel offset? Yes (although there's a related story there; sigh). Turns out the default corner style is... unhelpful. Ick. I still think there's a bug; the corners should at least all be the same... -- Matthew ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
Re: [Interest] QPainter::drawRect incorrectly "rounds" corners
are your pixels specified in floating point? have you accounted for the half-pixel offset? > On Oct 21, 2020, at 10:03 AM, Matthew Woehlke > wrote: > > I'm implementing a custom widget style for an application, and running into a > strange problem with QPainter::drawRect. Namely, it is not making the corners > square. > > This may be a problem specific to high-DPI displays and/or using a pen width > more than one physical pixel. The corner *should* look like this: > > # > # > ## > ## > ## > > ...but it looks like this: > > > # > ## > ## > ## > > Oddly, only the *left* corners have this issue; the *right* corners are > correct. > > How can I fix this? > > p.s. On a hunch, I tried ensuring that antialiasing was *off*, but that had > no effect. > > -- > Matthew > ___ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest
[Interest] QPainter::drawRect incorrectly "rounds" corners
I'm implementing a custom widget style for an application, and running into a strange problem with QPainter::drawRect. Namely, it is not making the corners square. This may be a problem specific to high-DPI displays and/or using a pen width more than one physical pixel. The corner *should* look like this: # # ## ## ## ...but it looks like this: # ## ## ## Oddly, only the *left* corners have this issue; the *right* corners are correct. How can I fix this? p.s. On a hunch, I tried ensuring that antialiasing was *off*, but that had no effect. -- Matthew ___ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest