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

2020-09-01 Thread Thiago Macieira
On Tuesday, 1 September 2020 14:17:50 PDT Bernhard Lindner wrote:
> Anyway, how does cmake behave regarding the described moc target detection
> problem? Does it work smarter than qmake?

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.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



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


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

2020-09-01 Thread Bernhard Lindner
Hi Thiago!

> > Well, what about coming cmake in Qt6? I assume Qt Creator will support cmake
> > based projects for application developers. Do you see a chance to fix the
> > problem using the new tool set?
> 
> Qt Creator has supported CMake for 10 years or more. Building Qt applications 
> with CMake has been officially supported since 5.0.

LOL! Well, sorry, shame on me, I never had a reason to look for anything 
different than
qmake (for Qt development).

Anyway, how does cmake behave regarding the described moc target detection 
problem? Does
it work smarter than qmake?

-- 
Best Regards,
Bernhard Lindner

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


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

2020-09-01 Thread Thiago Macieira
On Tuesday, 1 September 2020 12:29:29 PDT Bernhard Lindner wrote:
> Well, what about coming cmake in Qt6? I assume Qt Creator will support cmake
> based projects for application developers. Do you see a chance to fix the
> problem using the new tool set?

Qt Creator has supported CMake for 10 years or more. Building Qt applications 
with CMake has been officially supported since 5.0.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



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


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

2020-09-01 Thread Bernhard Lindner
Hi Thiago!

> Correct, qmake does not preprocess, but it does try to guess what your 
> dependencies are. This is not restricted to moc outputs: any #include found 
> that match a source file is automatically removed from the list of targets to 
> build too.

Oh my! :-(

> A more correct way to do this would be to use GCC's makefile dependencies 
> output flags (-MM, etc.). But I guess no one wants to implement new features 
> for qmake.

You are probably right :-(

Well, what about coming cmake in Qt6? I assume Qt Creator will support cmake 
based
projects for application developers. Do you see a chance to fix the problem 
using the new
tool set?

-- 
Best Regards,
Bernhard Lindner

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


Re: [Interest] Qt3D widget

2020-09-01 Thread Mike Krus via Interest
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




smime.p7s
Description: S/MIME cryptographic signature
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] Qt3D widget

2020-09-01 Thread Florian Blume
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


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

2020-09-01 Thread Thiago Macieira
On Monday, 31 August 2020 09:31:17 PDT Bernhard Lindner wrote:
> It appears to me that qmake is looking for "#include "moc_module.cpp"" using
> some simple regular expression which does not take any conditional
> compilation into account. Is this correct?

Correct, qmake does not preprocess, but it does try to guess what your 
dependencies are. This is not restricted to moc outputs: any #include found 
that match a source file is automatically removed from the list of targets to 
build too.

A more correct way to do this would be to use GCC's makefile dependencies 
output flags (-MM, etc.). But I guess no one wants to implement new features 
for qmake.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



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


[Interest] Qt Creator + Incredibuild ?

2020-09-01 Thread David M. Cotter
i see in the 4.13 release notes: 

> Also many thanks to IncrediBuild for contributing their Qt Creator 
> integration 
> !
> (You need to open Help > About Plugins (or Qt Creator > About Plugins on 
> macOS) and enable these plugins before you can use them.)

does this mean that the incredibuild plugin now COMES WITH Qt Creator?

i've had "upgrade fiasco" several times before i learned to NEVER upgrade Qt 
Creator on windows UNTIL AFTER the Incredibuild tools were updated, so i'm wary 
of hitting that snag.

i see there IS NO Incredibuild plugin built for Qt Creator 4.13 on the 
downloads page:
https://incredibuild.atlassian.net/wiki/spaces/IUM/pages/19202836/IncrediBuild+for+Qt+Creator
 


the last one is 4.12

so i refuse to upgrade to 4.13, until

a: i see a plugin on that page specifically built for it or
b: someone tells me that Qt Creator 4.13 update COMES WITH the proper plugin 
already?

yes? pretty please???

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


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

2020-09-01 Thread Bernhard Lindner
Hi!

> Add to your module.cpp:
> 
> #include "moc_module.cpp"
> 
> This is recommended anyway, regardless of your problem. Always #include the 
> module output for your headers in your corresponding .cpp files.

I tried a variant of the above using C++17 __has_include:

   #if __has_include("moc_module.cpp")
  #include "moc_module.cpp"
   #endif

My goal was easier module maintenance by automatic inclusion of moc-code in 
case moc found
relevant code in the header. Especially after reworking a module this can be 
easily
forgotten without the above.

Then I get this error: 

   No rule to make target 'moc_module.cpp', needed by 'core_module.o'.  Stop.

I also tried this:

   #if 0
  #include "moc_module.cpp"
   #endif

Same error.

It appears to me that qmake is looking for "#include "moc_module.cpp"" using 
some simple
regular expression which does not take any conditional compilation into 
account. Is this
correct?

-- 
Best Regards,
Bernhard Lindner

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