It works well on target with embedded Linux using default font and setting
font point size..But on Ubuntu, layout alignment is not proper after using
the same font point size..It looks like it needs to be set different point
size on Ubuntu for proper layout using macro as it is a dynamic layout
based on the items from the model.

On Tue 11 Sep, 2018, 07:46 Ramakanth Kesireddy, <rama.k...@gmail.com> wrote:

>
> ---------- Forwarded message ---------
> From: Allan Sandfeld Jensen <k...@carewolf.com>
> Date: Sun 9 Sep, 2018, 03:35
> Subject: Re: [Interest] Macro to identify desktop(Ubuntu-X86) and embedded
> Linux(ARM)
> To: <interest@qt-project.org>
> Cc: Thiago Macieira <thiago.macie...@intel.com>
>
>
> On Samstag, 8. September 2018 22:56:29 CEST Thiago Macieira wrote:
> > On Saturday, 8 September 2018 11:56:45 PDT Tomasz Olszak wrote:
> > > So as well you can to it in runtime and don't need macro.
> >
> > Better yet, don't do anything. Use the font that the user configured and
> > don't override. If you don't like the font, use your desktop's font
> > changing tool to make the customisation.
>
> And getting the system default fonts can be a bit tricky, but it is done
> like
> this:
>
> QFontDatabase db; // needs to be instantiated at least once first
> QFont defaultFont;
> defaultFont.setStyleHint(QFont::SansSerif);
> defaultFont = QFont(defaultFont.defaultFamily()));
>
> You have to use QFont first as a query to query the default, and then you
> can
> set the default name to get the actual default font. This is because
> QFont::StyleHint generally isn't working well cross-platform, and it is
> also
> not quite clear what it is supposed to do in general font queries, but it
> can
> query default font families like this.
>
> I might have cleaned parts of this up so it is less error-prone, but this
> is at least the old standard incantation for font defaults.
>
> 'Allan
>
>
>
>
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to