[Interest] Qt.conf and desktop application

2019-01-15 Thread Jérôme Godbout
Hi,
I'm having some problem while porting an application to Linux Desktop. I'm 
using a qt.conf to set 2 values
[Paths]
Translations = :/i18n
Qml2Imports = :/

I don't do anything else, but I cannot launch my application when I add the 
Qt.conf (even with only Translations). The platform library cannot be found 
anymore. I'm having a hard time figuring how to setup this for desktop since 
the debug and packaged application will fetch those at different place I guess. 
And why does the non set value get modified? Seem like giving a qt.conf make 
some kind of magic into qt creator and affect the plugins path to be destroyed.

Console output

QML debugging is enabled. Only use this in a safe environment.
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be 
initialized. Reinstalling the application may fix this problem.

Anybody how to create a qt.conf that work on desktop inside QtCreator and also 
after deploy gather of file?

Thanks,
Jerome
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] QtQuickCompiler interfer with lupdate

2019-01-15 Thread Jérôme Godbout
Hi,

Using Qt 5.12.0. This is under Linux.

I have some internationalization in my project. I made my .pri to add the .qml 
files and manages the required languages and files. This is all working with 
the external tools / linguistic. If I have the following line to my .pro
CONFIG += qtquickcompiler
it stop working. lupdate doesn't found anything. Is there something special to 
do when doing this or should I disable the line with lupdate_only  or 
lrelease_only into my .pro file? Why using the qtquickcompiler disable the 
lupdate parsing. Launching the lupdate command  from command line also 
reproduce the problem.

commenting the compiler make it work again and the lupdate see everything again.

It took me 3h to figure that out, by making an example project and injecting 
all the diff slowly to find this. If this is wanted maybe an error should be 
displayed. If it need something else is required, maybe print a warning.

Jerome
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QQmlApplicationEngine and antialiasing

2019-01-15 Thread Jérôme Godbout
Ah good to known, I will keep a note about this env variables to print the info.

Seem like if I used the 3D acceleration, the AA samples is not used and stick 
to 1, but if I do not enable the 3D acceleration into my VM, I get lie and it 
tell me I have the requested samples but it is not seen into the rendering. I 
did try with 4x and 8x samples. I'm a bit confuse about this.

***
VM (Virtual Box with 3D acceleration option)
***
QML debugging is enabled. Only use this in a safe environment.
OpenGL Warning: glXChooseVisual: bad attrib=0x186a0, ignoring
OpenGL Warning: glXChooseVisual: bad attrib=0x186a1, ignoring
OpenGL Warning: glXChooseVisual: bad attrib=0x186a0, ignoring
OpenGL Warning: glXChooseVisual: bad attrib=0x186a1, ignoring
OpenGL Warning: vboxCall failed with VBox status code VERR_BUFFER_OVERFLOW

qt.scenegraph.general: QSG: basic render loop
qt.scenegraph.general: Using sg animation driver
OpenGL Warning: glXChooseVisual: bad attrib=0x186a0, ignoring
OpenGL Warning: glXChooseVisual: bad attrib=0x186a1, ignoring
OpenGL Warning: glXChooseVisual: bad attrib=0x186a0, ignoring
OpenGL Warning: glXChooseVisual: bad attrib=0x186a1, ignoring
Surface Format:  "Version: 2.1 Profile: No Profile Samples: 1 Depth: 24 Alpha: 
8 Red: 8 Green: 8 Blue: 8"
Requested AA Samples:  8
AA sample rate not supported on this machine.
qt.scenegraph.general: texture atlas dimensions: 1024x512
qt.scenegraph.general: R/G/B/A Buffers:   8 8 8 8
qt.scenegraph.general: Depth Buffer:  24
qt.scenegraph.general: Stencil Buffer:8
qt.scenegraph.general: Samples:   1
qt.scenegraph.general: GL_VENDOR: Humper
qt.scenegraph.general: GL_RENDERER:   Chromium
qt.scenegraph.general: GL_VERSION:2.1 Chromium 1.9
qt.scenegraph.general: GL_EXTENSIONS: GL_CR_performance_info 
GL_ARB_point_sprite GL_EXT_blend_minmax GL_EXT_secondary_color 
GL_NV_vertex_program3 GL_EXT_framebuffer_object GL_EXT_texture_env_dot3 
GL_CR_window_size GL_CR_saveframe GL_ARB_texture_non_power_of_two 
GL_NV_vertex_program2_option GL_ARB_texture_env_add GL_NV_texgen_reflection 
GL_EXT_multi_draw_arrays GL_NV_register_combiners2 GL_ARB_depth_texture 
GL_CR_state_parameter GL_EXT_texture_sRGB GL_EXT_blend_subtract 
GL_EXT_fog_coord GL_ARB_vertex_shader GL_ARB_shader_texture_lod 
GL_NV_fragment_program_option GL_NV_vertex_program1_1 
GL_ARB_texture_env_crossbar GL_EXT_texture_filter_anisotropic 
GL_ARB_fragment_shader GL_EXT_texture_edge_clamp GL_CR_synchronization 
GL_NV_register_combiners GL_CR_tilesort_info GL_CR_cursor_position 
GL_ARB_vertex_buffer_object GL_ARB_window_pos GL_EXT_blend_func_separate 
GL_EXT_stencil_wrap GL_CR_server_matrix GL_ARB_texture_mirrored_repeat 
GL_ARB_fragment_program GL_ARB_texture_env_combine GL_EXT_shadow_funcs 
GL_ARB_shading_language_100 GL_ARB_texture_cube_map GL_SGIS_generate_mipmap 
GL_EXT_blend_equation_separate GL_ARB_draw_buffers GL_CR_print_string 
GL_ATI_texture_mirror_once GL_CR_readback_barrier_size GL_CR_tile_info 
GL_NV_fragment_program GL_ARB_texture_rectangle GL_ARB_shader_objects 
GL_ARB_texture_compression GL_EXT_draw_range_elements GL_NV_texture_rectangle 
GL_IBM_rasterpos_clip GL_ARB_texture_border_clamp GL_ARB_point_parameters 
GL_ARB_shadow GL_EXT_texture_env_add  GL_EXT_blend_color 
GL_EXT_compiled_vertex_array GL_CR_server_id_sharing 
GL_EXT_texture_compression_s3tc GL_IBM_texture_mirrored_repeat 
GL_NV_vertex_program GL_ARB_transpose_matrix GL_ARB_texture_env_dot3 
GL_CR_head_spu_name GL_ARB_pixel_buffer_object GL_ARB_vertex_program 
GL_EXT_stencil_two_side GL_ARB_multitexture GL_ARB_texture_float 
GL_CR_bounding_box GL_EXT_texture_lod_bias GL_EXT_texture3D 
GL_NV_fragment_program2 GL_EXT_texture_cube_map GL_EXT_texture_object 
GL_NV_fog_distance GL_ARB_multisample GL_NV_vertex_program2 
GL_EXT_framebuffer_blit GL_ARB_occlusion_query GL_EXT_texture_env_combine
qt.scenegraph.general: Max Texture Size: 32768
qt.scenegraph.general: Debug context:false
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (8 8 8 8)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 8 8 8)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 8 8)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 8)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 8)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 8)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 8)
***
VM (Virtual Box without 3D acceleration option)
***
QML debugging is enabled. Only use this in a safe environment.
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (8 8 8 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 8 8 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 8 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
qt.glx: qglx_findConfig: Failed to finding matching FBConfig (1 1 1 0)
qt.glx: 

Re: [Interest] QQmlApplicationEngine and antialiasing

2019-01-15 Thread Giuseppe D'Angelo via Interest

Il 15/01/19 16:10, Jérôme Godbout ha scritto:
There is no difference between 0, 2, 4, 8 except the print 
QSurfaceFormat reported value. Is there anything else I should check? Is 
OpenGL used at all?




Export QSG_INFO=1 and run your application. What's the output?

Cheers,
--
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] QQmlApplicationEngine and antialiasing

2019-01-15 Thread Jérôme Godbout
Hi,

Thanks for the tips, yeah This is what I tried first, but I don't see any 
effect whatsoever. If I read back the QSturfaceFormat, it only display the 
given samples but not on visual effect seen.


My log trace: Surface Format:  "Version: 3.0 Profile: No Profile Samples: 8 
Depth: 24 Alpha: 8 Red: 8 Green: 8 Blue: 8"


What I see:

[cid:1d4223bd-1ece-45ce-8476-7a7ce36bea4d]

There is no difference between 0, 2, 4, 8 except the print QSurfaceFormat 
reported value. Is there anything else I should check? Is OpenGL used at all?



#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#define NB_AA_SAMPLE 8

void PrintSurfaceFormat(QSurfaceFormat& format)
{
QStringList info;
info
<< QString("Version: 
%1.%2").arg(format.version().first).arg(format.version().second)
<< QString("Profile: %1").arg(format.profile() == 
QSurfaceFormat::CoreProfile
? "Core"
: format.profile() == 
QSurfaceFormat::CompatibilityProfile
? "Compatibility"
: "No Profile")
<< QString("Samples: %1").arg(format.samples())
<< QString("Depth: %1").arg(format.depthBufferSize())
<< QString("Alpha: %1").arg(format.alphaBufferSize())
<< QString("Red: %1").arg(format.redBufferSize())
<< QString("Green: %1").arg(format.greenBufferSize())
<< QString("Blue: %1").arg(format.blueBufferSize())
;
qDebug() << "Surface Format: " << info.join(" ");
}

void CheckOpenGLContext(QOpenGLContext* ogl_contex)
{
QSurfaceFormat surface_format = ogl_contex->format();
PrintSurfaceFormat(surface_format);
if(surface_format.samples() != NB_AA_SAMPLE)
{
qWarning("AA sample rate not supported on this machine.");
}
}

void CheckOGL(QGuiApplication& app)
{
QList windows = app.topLevelWindows();
std::any_of(windows.begin(), windows.end(), [&](QWindow* w)
{
QQuickWindow* window = qobject_cast(w);
if(window != nullptr)
{
QObject::connect(window, ::openglContextCreated, 
[&](QOpenGLContext* ogl_ctx){ CheckOpenGLContext(ogl_ctx); });
QOpenGLContext* ogl_context = window->openglContext();
if(ogl_context != nullptr)
{
CheckOpenGLContext(ogl_context);
}
return true;
}
return false;
});
}

void EnableDefaultAA()
{
QSurfaceFormat surface_format = QSurfaceFormat::defaultFormat();
surface_format.setSamples(NB_AA_SAMPLE);
QSurfaceFormat::setDefaultFormat(surface_format);
}

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

QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QGuiApplication app(argc, argv);

QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
if (engine.rootObjects().isEmpty())
return -1;

CheckOGL(app);

return app.exec();
}





From: Interest  on behalf of Giuseppe D'Angelo 
via Interest 
Sent: Monday, January 14, 2019 6:37 PM
To: interest@qt-project.org
Subject: Re: [Interest] QQmlApplicationEngine and antialiasing

On 14/01/2019 22:10, Jérôme Godbout wrote:
> Hi,
>
> I'm trying to enable the antialiasing inside my project that use
> QQmlApplicationEngine (currently under Linux). I have some QMl Shape
> that look ugly and the antialiasing doesn't seem to work at all. What is
> the proper way to enable the AA that is cross platform and will work on
> both QtCreator debug and release mode?

Note that debug/release mode has nothing to do with this...

Assuming that you're using the OpenGL backend:

> I have try to enable the default surface at the very beginning of the
> main, after the application is created or even on the QWindow surface,
> but nothing seem to work:
>
> #include 
> #include 
> #include 
> #include 
> #include 
>
> #define NB_AA_SAMPLE 8
>
> void EnableAntialiasingOnEngine(QGuiApplication& app)
> {
>  QWindow* window = app.topLevelWindows().first();
>  QSurfaceFormat surface_format; // = window->format();
>  surface_format.setSamples(NB_AA_SAMPLE); // AA sampling
>  window->setFormat(surface_format);
> }

This is meaningless; you need to set the format on the window AND the
context and you need to do so before they're created (in the sense of
calling create() on them). In other words, this is incomplete and too late.

> void EnableAA()
> {
>  QOpenGLContext ogl_context;
>  QSurfaceFormat surface_format;
>  surface_format.setSamples(NB_AA_SAMPLE);
>  ogl_context.setFormat(surface_format);
>  if(!ogl_context.create())
>  {
>  qWarning("Cannot create OpenGL context for AA.");
>  }
> }

This might be useful as a check that you CAN create an OpenGL context
that supports MSAA. But note that the mere creation isn't enough, you

[Interest] Can't run simple Auto Test Project on arm64-v8a

2019-01-15 Thread René Hansen
Has anyone else run into this bug with arm64-v8a?

https://bugreports.qt.io/browse/QTBUG-73054

Regular application templates seems to run fine, but not unit tests.


/René
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest