[Interest] Qt Charts: Making the legend top and right aligned

Mike Chinander chinander at gmail.com
Wed Apr 11 16:03:05 CEST 2018


Not sure of a solution to this, but noticed that unlike other uses of
Qt::Alignment flags, the QLegend docs say, "If you set more than one flag,
the result is undefined."

https://doc.qt.io/qt-5.10/qlegend.html#alignment-prop

On Wed, Apr 11, 2018 at 8:51 AM, Christopher Probst <
christop.probst at gmail.com> wrote:

> Hi,
>
> I would like to place the legend of  chart that uses Qt charts at the top
> right of the view. I would have expected something like this to work:
>
>  m_chart->legend()->setAlignment(Qt::AlignTop| Qt::AlignRight)
>
>
> Unfortunately it does not! Is there a direct way to  make the legends (right or left) be top aligned rather then middle.?
>
>
> Thanks,
>
> Christopher
>
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180411/55a3dfb1/attachment.html>


More information about the Interest mailing list