Re: [Interest] Three-file modules vs. moc

2020-09-02 Thread Bernhard Lindner
> If you turn automoc on, it tries to guess which moc files need to be 
> generated 
> and which ones are #included by way of regular expressions too. If you don't 
> like that, don't use automoc.

Ok, I see, thanks.

If cmake/automoc uses the same basic search and if there is no interest/plans 
in making it
smarter, I will drop the original idea.

Currently I would like to prefer to drop moc ;)

-- 
Best Regards,
Bernhard Lindner

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


[Interest] Is it possible to build Qt with PDBs but not QtWebEngine

2020-09-02 Thread Stefan Böhmann
Hi,

we build Qt 5.12.9 (as a whole, not the modules individually) once in release 
and once in debug mode. But our debug build fails.

> 16:16:24  jom: parallel job execution disabled for Makefile.core_module
> 16:16:24  jom.exe -f Makefile.core_module.Debug
> 16:16:24  rc /NOLOGO -D_DEBUG -DUNICODE -D_UNICODE -DWIN32 
> -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 
> -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_WEBENGINECORE_LIB 
> -DQT_BUILDING_QT -D_CRT_SECURE_NO_WARNINGS -D_USE_MATH_DEFINES 
> -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT 
> -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS 
> -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_NO_EXCEPTIONS -DQT_QUICK_LIB 
> -DQT_GUI_LIB -DQT_WEBCHANNEL_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB 
> -DQT_WEBENGINECOREHEADERS_LIB -D_WINDLL -fo 
> .obj\debug\Qt5WebEngineCored_resource.res Qt5WebEngineCored_resource.rc
> 16:16:24  linking ..\..\lib\Qt5WebEngineCored.dll 
> 16:20:16  LINK : fatal error LNK1102: out of memory


This is a VS2019 build on a 16 core machine with 32GB RAM. I monitored the 
build and it consumed almost 50 GB memory (so including swap) before it failed.
It worked some time ago, but in the meantime there was a VS2019 update and we 
also activated IncrediBuild. Probably one of them caused this error. 

Anyway. We do not need the PDBs for QtWebEngine.

My question is therefore whether there is a way to build Qt as a whole with 
PDBs while turning off PDB generation for QtWebEngine? 
If not, can anyone give me a hint where to look to patch it myself?
Or has anyone some other idea/solution?


Best regards, 
Stefan
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] QtWebkit stylesheet issue using css

2020-09-02 Thread Ramakanth Kesireddy
Hi,

Am using Qt WebKit 5.212 Alpha4 release through yocto build on top of Qt
5.6.3 binaries.
Raised the issue https://github.com/qtwebkit/qtwebkit/issues/1021 where
scroll bar stylesheet using css is not visible on target.


It does work with scrollbar visible on ubuntu using css stylesheet
using the API setUserStyleSheetUrl().

If so, is there any patch to fix the same incase it is a upstream webkit
issue or known issue that scroll bar is not visible with css on target or
am missing any dependency on target?

Is it worth trying on Qt 5.5.1 incase such issue is not observed?

Please suggest in this regard.

Best Regards,
Ramakanth
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] Qt3D widget

2020-09-02 Thread Florian Blume
Hey,

thanks for your quick answer!

I actually had the version you described first running. I obtained the
rendered image using QRenderCapture and then displayed it on the quad.

I also already had the second idea that you described but thought it
should be possible to obtain the texture from Qt3D and use it in OpenGL
that's why I hadn't
investigated this any further.

Unfortunately, it's pretty difficult to run the aspect engine manually.
I tried to place a processFrame() call in paintGL() - and even placed a
doRender() call to
the AbstractRenderer of the QRenderAspectPrivate after it like this:

d->m_aspectEngine->processFrame();

glClearColor(1.0, 1.0, 1.0, 1.0);
glDisable(GL_BLEND);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

Qt3DRender::QRenderAspectPrivate *dRenderAspect =
static_cast
   
(Qt3DRender::QRenderAspectPrivate::get(d->m_renderAspect));
Qt3DRender::Render::AbstractRenderer *renderer = dRenderAspect->m_renderer;
renderer->doRender(true);

Without the doRender() call it gets stuck the second time processFrame()
is called - in
Qt3DRender::Render::VSyncFrameAdvanceService::waitForNextFrame() where it
tries to acquire a semaphore (which apparently doesn't have any more
work ready).

With the doRender() call it gets stuck in a similar place - but in the
first call to paintGL in Qt3DRender::Render::Renderer::isReadyToSubmit()
where it again tries to
acquire a semaphore.

I also don't understand whether it's enough that QOpenGLWidget binds a
framebuffer before calling paintGL, it looks like in Scene3DRenderer
this is enough to make
Qt3D draw to that framebuffer.

As you can see there are a lot of open questions which are difficult to
answer. Do you have any suggestions where/how to look for answers?
Obviously in the code itself,
which is also difficult.

Any help is appreciated,
Florian


On 01.09.20 18:28, Mike Krus wrote:
> Hi
>
> Qt 3D source code has an example of how to use render capture in the manual 
> tests.
>
> However this is probably not the right way to do it as 1/ it would require 
> another FBO on top of the one QOpenGLWidget uses already; 2/ it transfers the 
> image to the CPU which is not needed here.
>
> Think the way to do it is to do something similar to what is done for Scene3D:
> - setup Qt 3D engine to be in manual mode (rather than using the simulation 
> loop)
>   by calling QAspectEngine::setRunMode(QAspectEngine::Manual)
> - use QOpenGLWidget and in the paintGL method call 
> QAspectEngine::processFrame()
>   to have Qt 3D draw
>
> There’s of course lots of other stuff to setup. Might need a dummy offscreen 
> surface to handle sizing, handling of the context, and a fair amount more.
>
> Mike
>
>> On 1 Sep 2020, at 16:51, Florian Blume  wrote:
>>
>> Hi,
>>
>> I'm trying to implement a Qt3D widget since createWindowContainer is not
>> suitable for me (always draws the Qt3DWindow on top of everything).
>> I've already asked a Stackverflow question
>> (https://stackoverflow.com/questions/63686309/use-qt3d-offscreen-rendered-texture-in-opengl)
>> because I ran into
>> several issues trying to display an offscreen texture that I render to
>> with Qt3D in a QOpenGLWidget (it simply doesn't display anything).
>>
>> Has anyone some other solution regarding a Qt3D widget?
>>
>> Best regards,
>> Florian
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> https://lists.qt-project.org/listinfo/interest
> —
> Mike Krus | mike.k...@kdab.com | Senior Software Engineer
> KDAB (UK) Ltd., a KDAB Group company
> Tel: UK Office +44 1625 809908   Mobile +44 7833 491941
> KDAB - The Qt Experts, C++, OpenGL Experts
>
>

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


Re: [Interest] Qt program scripting with PySide2

2020-09-02 Thread Cristián Maureira-Fredes



On 9/2/20 11:32 AM, Filippo Rusconi via Interest wrote:

Greetings, Fellow Developers,

[snip]


I hope that helps you,


Thank you so much, Cristián, for your answer.

I have looked into the documents that you referred to above and found 
them very

exciting. I have a question, though:
Logically, all the examples are citing the creation of Python bindings 
to C++

Qt-based libraries.


The ones I included yes,
but we do have cases with non-Qt projects,
for example:

https://code.qt.io/cgit/pyside/pyside-setup.git/tree/examples/samplebinding?h=5.15

which has this blog post associated:
https://www.qt.io/blog/2018/05/31/write-python-bindings

If you would like to see and even minimal example
on how to generate bindings, you can check this 'hello world'
example from the Virtual Tech Summit 2020:

http://maureira.xyz/talks/qt/qtforpython_vts2020/code/example_module.html


In my GUI software, I use one public library that I co-develop with a 
colleague,
and making Python bindings to it appears to be perfectly feasible. The 
point is
that my program (executable GUI binary) is written in C++ and not using 
PySide2.
How can I make the features in the GUI binary's code accessible to 
Python users?

That is, can bindings be created not only for libs but also for executable
binaries?  Or, in other words, how can I take control of the C++-based 
program

using Python? If this is no possible, then what should be the course of
development? Switch all the GUI code to PySide2, put any non-GUI code in a
private lib to which Python bindings would be created ?


I guess with the previous links you will be able to expose C++ code
to Python, independent of the libraries you use, however keep in mind
that if you want to expose a specific aspect of the library you wrote,
you might need bindings for it too.

You cannot create bindings for a specific executable,
but you can expose 'something' from what's forming that executable
to Python, and create bindings for it, for example, on the 
'scriptableapplication' example, we expose only the 'MainWindow' class

to Python, that's why that can provide control of the C++ application,
although, since that depended on a 'QMainWindow' which had bindings
for Python, it was simpler. If something that you want to expose to 
Python, does not have a plain C++ type, that type will require 
additional bindings.


If I may ask, what are you using for your GUI related code?



Sorry for these layman questions,


Not at all, pretty valid questions.



Most sincerely,

Filippo



Cheers!

--
Dr. Cristian Maureira-Fredes
R Manager

The Qt Company GmbH
Erich-Thilo-Str. 10
D-12489 Berlin

Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin,
Registergericht: Amtsgericht
Charlottenburg, HRB 144331 B
--
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Qt program scripting with PySide2

2020-09-02 Thread Filippo Rusconi via Interest

Greetings, Fellow Developers,

regarding the message I sent about scripting in Qt, for which I received, some
enlightening answers, I would like to deepen my understanding about PySide2 (see
below).


Date: Thu, 18 Jun 2020 19:05:15 +0200
From: Cristián Maureira-Fredes 
To: interest@qt-project.org
Subject: Re: [Interest] Qt scripting with JavaScript



On 6/18/20 11:35 AM, Filippo Rusconi via Interest wrote:
> Greetings, Fellow Developers,
> [snip]
> Script-wise, how about using Python to make my program scriptable? Is
> PySide
> something that would match the requirement? Has anybody tried both Qt
> Script and
> Python ? If so, what lessons were learnt ?

Hey Filippo,

we have an example called 'scriptableapplication',
which it seems is the requirement you have.
The scenario is a Qt/C++ desktop application,
from which we embed a Python interpreter,
so you can modify the application with Python scripts.

Source:
https://code.qt.io/cgit/pyside/pyside-setup.git/tree/examples/scriptableapplication

If you want to check an animation of how that looks like:
https://www.qt.io/blog/2019/08/19/technical-vision-qt-python
(check the GIF under "Embedding Python")

If you want to watch a couple of minutes
from the last webinar on that topic, check this video
https://www.youtube.com/watch?v=Vb1dbLQafyM=27m06s
(notice the time)
That's an extension of the same example,
but implementing a plugin system on top.

I hope that helps you,


Thank you so much, Cristián, for your answer.

I have looked into the documents that you referred to above and found them very
exciting. I have a question, though: 


Logically, all the examples are citing the creation of Python bindings to C++
Qt-based libraries. 


In my GUI software, I use one public library that I co-develop with a colleague,
and making Python bindings to it appears to be perfectly feasible. The point is
that my program (executable GUI binary) is written in C++ and not using PySide2.
How can I make the features in the GUI binary's code accessible to Python users?
That is, can bindings be created not only for libs but also for executable
binaries?  Or, in other words, how can I take control of the C++-based program
using Python? If this is no possible, then what should be the course of
development? Switch all the GUI code to PySide2, put any non-GUI code in a
private lib to which Python bindings would be created ?

Sorry for these layman questions,

Most sincerely,

Filippo

--

⢀⣴⠾⠻⢶⣦⠀  Filippo Rusconi, PhD
⣾⠁⢠⠒⠀⣿⡁   Research scientist at CNRS
⢿⡄⠘⠷⠚⠋⠀   Debian Developer
⠈⠳⣄  http://msxpertsuite.org
  http://www.debian.org

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