Re: [Interest] Qt Charts

2016-03-08 Thread Andy
Scott:

I believe Qt Charts is scheduled to be included in Qt 5.7:

  https://wiki.qt.io/New_Features_in_Qt_5.7
  http://blog.qt.io/blog/2016/02/22/qt-roadmap-for-2016/

- Andy

On Tue, Mar 8, 2016 at 11:00 PM, Scott Aron Bloom  wrote:

> I have downloaded the latest 5.6.0rc from
> https://download.qt.io/development_releases/qt/5.6/5.6.0-rc
>
>
>
> And I cant for the life of me find the new (or old, or any) Qt Charts sub
> module.
>
>
>
> Where can it be found?
>
> Scott
>
>
>
>
>
> ___
> 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


[Interest] [Qt3D] assimp lib update?

2016-03-21 Thread Andy
Is there a plan to update the assimp lib included with Qt3D from 3.1.1 (12
Jun 2014) to 3.2 (3 Nov 2015)?

Maybe for 5.7?

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3D] Use a QImage as a QTextureImage

2016-04-05 Thread Andy
I have a QImage that I'm generating programmatically using a QPainter which
I want to use as a texture.

I want to use it in a QNormalDiffuseMapAlphaMaterial as a diffuse texture -
so it needs a QTextureImage whose source is set using a QUrl.

How do I get from my in-memory QImage to a QUrl to set this source?  Or is
there another path I'm missing to accomplish this?

I'm also going to want to render text as a billboard - is this the right
way to do it too?  (Generate into a QImage with QPainter and use textures
on a QPlaneMesh?)

(C++, not QML)

Thanks!

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3D] Camera controllers

2016-04-05 Thread Andy
The current Qt3D examples have two camera controller classes included in
examples-common: QOrbitControl and QFirstPersonCameraController.

Are there plans to add these to Qt3D as supported classes?  Seems like most
projects would benefit from having a couple of standard camera controllers
like these.

(Also, the names should probably be consistent - *Control vs *Controller.)

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3D] Use a QImage as a QTextureImage

2016-04-07 Thread Andy
[bump]

Does anyone have any suggestions on how to use an in-memory QImage as a
QTextureImage?  Or any other way to create a QNormalDiffuseMapAlphaMaterial
from an in-memory QImage?  I must be missing something obvious.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Tue, Apr 5, 2016 at 8:30 AM, Andy  wrote:

> I have a QImage that I'm generating programmatically using a QPainter
> which I want to use as a texture.
>
> I want to use it in a QNormalDiffuseMapAlphaMaterial as a diffuse texture
> - so it needs a QTextureImage whose source is set using a QUrl.
>
> How do I get from my in-memory QImage to a QUrl to set this source?  Or is
> there another path I'm missing to accomplish this?
>
> I'm also going to want to render text as a billboard - is this the right
> way to do it too?  (Generate into a QImage with QPainter and use textures
> on a QPlaneMesh?)
>
> (C++, not QML)
>
> Thanks!
>
> ---
> Andy Maloney  //  https://asmaloney.com
> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3D] Render to video

2016-04-17 Thread Andy
Goal: generate video with a user-specified resolution, frame rate, &
container/codec format from an animation in my Qt3D window

(Disclaimer: I've never worked with video files before!)

As far as I can tell, Qt doesn't provide a way to generate video files
directly, so I think I have to write a series of QImages to disk and use
them to generate a video using ffmpeg.  This seems like it will take a
large amount of disk space, be pretty heavy on the I/O, and generally be
slow.  Are there better solutions?

If I need to do it that way though, I must generate QImages from my
existing Qt3DCore::QAspectEngine in my QWindow-derived class.  I don't see
a clear/elegant way to do this.

I think I need to create an offscreen surface? window? with the correct
resolution and then somehow render & animate my scene to it, saving
snapshots as I move the camera.  (I am already using QAbstractAnimation to
move the camera, so I would use it to grab the snapshots as well.)  Can I
use the same root entity in multiple QAspectEngines? (i.e. setRootEntity()
to my root entity in the new offscreen and tell it to render.)

Has anyone done this before?  Is this even close to the right approach?

(I'm using straight C++ - no QML.)

Thanks!

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3D] Render to video

2016-04-18 Thread Andy
On Mon, Apr 18, 2016 at 2:51 AM, Bo Thorsen  wrote:

> Den 18-04-2016 kl. 05:46 skrev Andy:
>
>> Goal: generate video with a user-specified resolution, frame rate, &
>> container/codec format from an animation in my Qt3D window
>>
>> (Disclaimer: I've never worked with video files before!)
>>
>> As far as I can tell, Qt doesn't provide a way to generate video files
>> directly, so I think I have to write a series of QImages to disk and use
>> them to generate a video using ffmpeg.  This seems like it will take a
>> large amount of disk space, be pretty heavy on the I/O, and generally be
>> slow.  Are there better solutions?
>>
>> If I need to do it that way though, I must generate QImages from my
>> existing Qt3DCore::QAspectEngine in my QWindow-derived class.  I don't
>> see a clear/elegant way to do this.
>>
>> I think I need to create an offscreen surface? window? with the correct
>> resolution and then somehow render & animate my scene to it, saving
>> snapshots as I move the camera.  (I am already using QAbstractAnimation
>> to move the camera, so I would use it to grab the snapshots as well.)
>> Can I use the same root entity in multiple QAspectEngines? (i.e.
>> setRootEntity() to my root entity in the new offscreen and tell it to
>> render.)
>>
>> Has anyone done this before?  Is this even close to the right approach?
>>
>> (I'm using straight C++ - no QML.)
>>
>
> Why do you want to do this in Qt when you can do it with applications like
> Camtasia?
>

Because I want to generate video from the Qt3D scene in my application?  I
don't understand the question.


> If you do want to follow this, the first part is to just generate
> screenshots. There's an example app in Qt that does this:
> http://doc.qt.io/qt-5/qtwidgets-desktop-screenshot-example.html.
>

I know I can save a widget as an image, but as I said, I need a
user-specified resolution and I need to get the info from the existing Qt3D
scene.  Offscreen seems like the logical solution.  I could (maybe)
duplicate the whole scene in an invisible widget and get images from that,
but that seems like a hack.


>
> Second, find one of the libraries that does video encoding and use your
> screenshots there.
>
> Shouldn't be too hard, but you might have to convert the pixels manually
> to the video library format, so it could be quite slow.
>
> Bo Thorsen,
> Director, Viking Software.
>
> --
> Viking Software
> Qt and C++ developers for hire
> http://www.vikingsoft.eu
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3D] Render to video

2016-04-18 Thread Andy
On Mon, Apr 18, 2016 at 3:26 AM, Harald Vistnes 
wrote:

> Hi Andy,
>
> An alternative is to use the FFMPEG encoding library instead of the
> command line tools. Then you can pass each frame to the video encoder as
> you generate it without writing them all to disk first.
>

This is non-GPL software, so I can't use the lib directly (I should have
mentioned that).  I haven't found a BSD or MIT lib that encodes the common
formats - is anyone aware of one?


>
> The natural way to generate the QImages would be to render to an offscreen
> surface of the desired resolution, and then pass each frame to the video
> encoder.
>

Great - so I'm on the right track!


> Unfortunately, reading back the content of offscreen surfaces is missing
> in Qt3D. According to these it will not come before 5.8.
>
> https://bugreports.qt.io/browse/QTBUG-52136
> https://bugreports.qt.io/browse/QTBUG-52074
>
> So AFAIK we just have to wait with generating images and videos with Qt3D.
>

Thanks Harald.  Your report is exactly what I'm looking for...  That's
unfortunate though - a real showstopper.


>
> Cheers,
> Harald
>
>
> 2016-04-18 5:46 GMT+02:00 Andy :
>
>> Goal: generate video with a user-specified resolution, frame rate, &
>> container/codec format from an animation in my Qt3D window
>>
>> (Disclaimer: I've never worked with video files before!)
>>
>> As far as I can tell, Qt doesn't provide a way to generate video files
>> directly, so I think I have to write a series of QImages to disk and use
>> them to generate a video using ffmpeg.  This seems like it will take a
>> large amount of disk space, be pretty heavy on the I/O, and generally be
>> slow.  Are there better solutions?
>>
>> If I need to do it that way though, I must generate QImages from my
>> existing Qt3DCore::QAspectEngine in my QWindow-derived class.  I don't see
>> a clear/elegant way to do this.
>>
>> I think I need to create an offscreen surface? window? with the correct
>> resolution and then somehow render & animate my scene to it, saving
>> snapshots as I move the camera.  (I am already using QAbstractAnimation to
>> move the camera, so I would use it to grab the snapshots as well.)  Can I
>> use the same root entity in multiple QAspectEngines? (i.e. setRootEntity()
>> to my root entity in the new offscreen and tell it to render.)
>>
>> Has anyone done this before?  Is this even close to the right approach?
>>
>> (I'm using straight C++ - no QML.)
>>
>> Thanks!
>>
>> ---
>> Andy Maloney  //  https://asmaloney.com
>> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>>
>>
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
>
---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3D] Render to video

2016-04-18 Thread Andy
On Mon, Apr 18, 2016 at 8:57 AM, Michael Sué  wrote:

> Hi,
>
> You may be able to use ffmpeg (the program not the library) via pipe as
> described in the "writing section" here:
>
>
> http://zulko.github.io/blog/2013/09/27/read-and-write-video-frames-in-python-using-ffmpeg/
>
> They use Python but it should work with C++ as well, I assume. And using
> the program should be possible even for non-GPL software.
>

That's a good idea - thanks Michael.  Should be pretty easy to do (at least
on the Mac - Windows...).


> Best, Michael.
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3D] Render to video

2016-04-18 Thread Andy
On Mon, Apr 18, 2016 at 9:05 AM, Sean Harmer  wrote:

> Hi,
>
> I think it's possible, although it's not an out of the box feature yet, as
> Harald pointed out.
>
> Have a look into this kind of approach:
>
> * Implement something similar to the Scene3DItem that allows to embed Qt 3D
> into a Qt Quick 2 scene
>

Thanks Sean.  I wouldn't have thought to go through Qt Quick since I've
never used it and it's not on my radar.


>
> * This requires using a little bit of private (for now) API to feed the Qt
> 3D
> renderer your own OpenGL context and to ask it to render when needed.
>
> * Use an FBO (as the Scene3D item does) as the render target - take care to
> tell the framegraph the size of this "external" render target.
>
> * Then, once the scene is rendered on your custom context, either:
>
> a) use glReadPixels to grab the contents of the texture you attached to the
> FBO and pass it to a software encoder.
>
> or
>
> b) use the texture id to pass the data to a hardware encoder such as nvenc
> without needing a round trip from the GPU->CPU->GPU.
>
> I think that can be made to work.
>

nvenc looks like it would be a big win for those with NVIDIA cards, and I
see AMD has the analogous VCE.


Thanks everyone for helping me get a better sense of the problem I'm trying
to solve!


>
> Cheers,
>
> Sean
>
> On Monday 18 April 2016 08:38:21 Andy wrote:
> > On Mon, Apr 18, 2016 at 3:26 AM, Harald Vistnes <
> harald.vist...@gmail.com>
> >
> > wrote:
> > > Hi Andy,
> > >
> > > An alternative is to use the FFMPEG encoding library instead of the
> > > command line tools. Then you can pass each frame to the video encoder
> as
> > > you generate it without writing them all to disk first.
> >
> > This is non-GPL software, so I can't use the lib directly (I should have
> > mentioned that).  I haven't found a BSD or MIT lib that encodes the
> common
> > formats - is anyone aware of one?
> >
> > > The natural way to generate the QImages would be to render to an
> offscreen
> > > surface of the desired resolution, and then pass each frame to the
> video
> > > encoder.
> >
> > Great - so I'm on the right track!
> >
> > > Unfortunately, reading back the content of offscreen surfaces is
> missing
> > > in Qt3D. According to these it will not come before 5.8.
> > >
> > > https://bugreports.qt.io/browse/QTBUG-52136
> > > https://bugreports.qt.io/browse/QTBUG-52074
> > >
> > > So AFAIK we just have to wait with generating images and videos with
> Qt3D.
> >
> > Thanks Harald.  Your report is exactly what I'm looking for...  That's
> > unfortunate though - a real showstopper.
> >
> > > Cheers,
> > > Harald
> > >
> > > 2016-04-18 5:46 GMT+02:00 Andy :
> > >> Goal: generate video with a user-specified resolution, frame rate, &
> > >> container/codec format from an animation in my Qt3D window
> > >>
> > >> (Disclaimer: I've never worked with video files before!)
> > >>
> > >> As far as I can tell, Qt doesn't provide a way to generate video files
> > >> directly, so I think I have to write a series of QImages to disk and
> use
> > >> them to generate a video using ffmpeg.  This seems like it will take a
> > >> large amount of disk space, be pretty heavy on the I/O, and generally
> be
> > >> slow.  Are there better solutions?
> > >>
> > >> If I need to do it that way though, I must generate QImages from my
> > >> existing Qt3DCore::QAspectEngine in my QWindow-derived class.  I don't
> > >> see
> > >> a clear/elegant way to do this.
> > >>
> > >> I think I need to create an offscreen surface? window? with the
> correct
> > >> resolution and then somehow render & animate my scene to it, saving
> > >> snapshots as I move the camera.  (I am already using
> QAbstractAnimation
> > >> to
> > >> move the camera, so I would use it to grab the snapshots as well.)
> Can I
> > >> use the same root entity in multiple QAspectEngines? (i.e.
> > >> setRootEntity()
> > >> to my root entity in the new offscreen and tell it to render.)
> > >>
> > >> Has anyone done this before?  Is this even close to the right
> approach?
> > >>
> > >> (I'm using straight C++ - no QML.)
> > >>
> > >> Thanks!
>

Re: [Interest] [Qt3D] Render to video

2016-04-18 Thread Andy
On Mon, Apr 18, 2016 at 10:00 AM, Jason H  wrote:

> I did something like this a long time ago in QML (Before Qt3D, QtQuick 1):
> 1. There is some kind of frame advance, so you set up the animations as
> you want, then you start the animation and render the first frame to an
> image. Then call frame advance and get the next frame, repeat.
> 2. Then use FFMPeg to create the video from the PNG/JPG files.
>
> A couple of pointers:
> 1. Use a multithreaded image saver. I was Passign QPixmap/QImage to a
> thread for saving to PNG and the compression time was horrendous. Being
> able to tap into all the CPUs scaled linearly. (I was rendering 1920x1080
> about 6 years ago)
> 2. You might have to restrict yourself to a raster painter (if such an
> option still exists)
>


Thanks Jason.

I'm hoping I can tap into the Qt3D FBO (Sean's suggestion) and pipe the
data directly to ffmpeg (Michael's suggestion) which would avoid all that
I/O.  Hardware encoding would also be nice, but first things first!


>
> *Sent:* Sunday, April 17, 2016 at 11:46 PM
> *From:* Andy 
> *To:* "Qt Project" 
> *Subject:* [Interest] [Qt3D] Render to video
> Goal: generate video with a user-specified resolution, frame rate, &
> container/codec format from an animation in my Qt3D window
>
> (Disclaimer: I've never worked with video files before!)
>
> As far as I can tell, Qt doesn't provide a way to generate video files
> directly, so I think I have to write a series of QImages to disk and use
> them to generate a video using ffmpeg.  This seems like it will take a
> large amount of disk space, be pretty heavy on the I/O, and generally be
> slow.  Are there better solutions?
>
> If I need to do it that way though, I must generate QImages from my
> existing Qt3DCore::QAspectEngine in my QWindow-derived class.  I don't see
> a clear/elegant way to do this.
>
> I think I need to create an offscreen surface? window? with the correct
> resolution and then somehow render & animate my scene to it, saving
> snapshots as I move the camera.  (I am already using QAbstractAnimation to
> move the camera, so I would use it to grab the snapshots as well.)  Can I
> use the same root entity in multiple QAspectEngines? (i.e. setRootEntity()
> to my root entity in the new offscreen and tell it to render.)
>
> Has anyone done this before?  Is this even close to the right approach?
>
> (I'm using straight C++ - no QML.)
>
> Thanks!
>
> ---
> Andy Maloney  //  https://asmaloney.com
> twitter ~ @asmaloney <https://twitter.com/asmaloney>
> ___ Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Example for: QTreeView + QAbstractItemModel + external data

2016-04-30 Thread Andy
On Sat, Apr 30, 2016 at 4:08 AM, anton  wrote:

> Thanks Björn,
>
> I'll try it (actually i did the job in the rowCount() function..)
> I would have preferred that the documentation be clear about this,
> I mean with a detailed example :-)
>

Slight aside:

Since you're working with QAbstractItemModel I would highly recommend using
Model Test in your debug build:

  https://wiki.qt.io/Model_Test

I've written many QAbstractItemModel-derived classes, and I still find them
hard to get right. Model Test has helped catch a lot of edge cases.


> Thanks
>
> Anton
>
> Björn Schäpers wrote:
>
> > Am 26.04.2016 um 19:05 schrieb anton:
> >> Hi,
> >>
> >> I have subclassed QAbstractItemModel,
> >> and I want to load additionally data in the model
> >> as soon as somebody clicks on the [+]
> >> in the treeview to load the children of this
> >> item form an external data ( web- app which gives me json data back).
> >>
> >> Now:
> >>   I reimplemented hasChildren() in the model
> >> but i am not sure about the moment to load the data.
> >>
> >> I suppose that the rowCount() method of the model is called
> >> when somebody expands an item in the view?
> >> If not what is the moment when my model should ask for additional Data?
> >>
> >> Does there exist a small example which demonstrates how to
> >> handle this in an optimal way.
> >> Not sure about beginInsertRows() or layoutChanged() ..
> >> I am experimenting but i get also some crashes so an
> >> example project would be nice.
> >>
> >> Thanks
> >>
> >> Anton
> > I think you are looking for QAbstractItemModel::canFetchMore() and
> > fetchMore(). See also the last paragraph in
> > http://doc.qt.io/qt-5/qabstractitemmodel.html
> >
> > To create models that populate incrementally, you can reimplement
> > fetchMore() and canFetchMore(). If the reimplementation of fetchMore()
> > adds rows to the model, beginInsertRows() and endInsertRows() must be
> > called.
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Divining the opengl versions available

2016-05-17 Thread Andy
FWIW here's how I'm doing it.

I set the default format at startup with my requested format:

   void  initOpenGL()
   {
  QSurfaceFormat format;

  format.setVersion( 3, 3 );
  format.setProfile( QSurfaceFormat::CoreProfile );

  format.setDepthBufferSize( 24 );
  format.setSamples( 4 );
  format.setStencilBufferSize( 8 );

  QSurfaceFormat::setDefaultFormat( format );
   }

Then I call this to dump some info so I know what I'm getting:

   void  openGLInfo()
   {
  // we need a QSurface active to get our GL functions from the context
  QWindow  surface;
  surface.setSurfaceType( QSurface::OpenGLSurface );
  surface.create();

  QOpenGLContext context;
  context.create();
  context.makeCurrent( &surface );

  QOpenGLFunctions  *funcs = context.functions();
  funcs->initializeOpenGLFunctions();

  qInfo() << "OpenGL Info";
  qInfo() << "  Vendor: " << reinterpret_cast(funcs->glGetString( GL_VENDOR ));
  qInfo() << "  Renderer: " << reinterpret_cast(funcs->glGetString( GL_RENDERER ));
  qInfo() << "  Version: " << reinterpret_cast(funcs->glGetString( GL_VERSION ));
  qInfo() << "  Shading language: " << reinterpret_cast(funcs->glGetString( GL_SHADING_LANGUAGE_VERSION ));
  qInfo() << "  Requested format: " << QSurfaceFormat::defaultFormat();
  qInfo() << "  Current format:   " << context.format();
   }

Which gives me something like this:

OpenGL Info
  Vendor:  NVIDIA Corporation
  Renderer:  NVIDIA GeForce GTX 780M OpenGL Engine
  Version:  4.1 NVIDIA-10.4.2 310.41.35f01
  Shading language:  4.10
  Requested format:  QSurfaceFormat(version 3.3, options QFlags(),
depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize
-1, alphaBufferSize -1, stencilBufferSize 8, samples 4, swapBehavior 0,
swapInterval 1, profile  1)
  Current format:QSurfaceFormat(version 4.1, options QFlags(),
depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8,
alphaBufferSize -1, stencilBufferSize 8, samples 4, swapBehavior 2,
swapInterval 1, profile  1)


(Note: This only gives me a 3.0 context on VMware Fusion 8.1 running
Windows 7 - should support 3.3 - so maybe I'm doing something wrong?)

If anyone has any suggestions for improvement it would be most welcome!


---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Tue, May 17, 2016 at 4:05 AM, Giuseppe D'Angelo 
wrote:

> On Tue, May 17, 2016 at 9:59 AM, Boudewijn Rempt  wrote:
> > Hm... But when I tried that with a nonsense version, say 9.9, I
> > got 9.9 back. Maybe I made a mistake, though. I copied the functions
> > check approach from the tesselation example from KDab's website...
>
> Did you _create_ the context or just set a format and asked for it
> back immediately?
>
> Using the functions for just testing whether you've got a certain GL
> version seems to me to be doing it the other way around. Then, sure,
> once you're happy with the version you need to grab them and use them.
>
> --
> Giuseppe D'Angelo
> ___
> 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


Re: [Interest] Use Qt to zip / unzip files on iOS, Android, OS X, & Windows ?

2016-08-18 Thread Andy
Ed:

I don't know if it's useful or not, but years ago I wrote a little
in-memory zip class you might be able to modify or build on.  It uses
minizip.

"In-memory ZIP File Access Using Qt"
https://asmaloney.com/2011/12/code/in-memory-zip-file-access-using-qt/

I think I have a more fleshed-out version somewhere.  If it's of interest I
can try to find it and dust of the decaying bits :-)



---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Thu, Aug 18, 2016 at 4:52 PM, Edward Sutton 
wrote:

> Is there a solution in Qt 5.6 LTS ?
>
> Else maybe a 3rd party lib such as QuaZip is good?
>
> http://quazip.sourceforge.net/
>
> -Ed
> This email and any files transmitted with it from The Charles Machine
> Works, Inc. are confidential and intended solely for the use of the
> individual or entity to which they are addressed. If you have received this
> email in error please notify the sender. Our company accepts no liability
> for the contents of this email, or for the consequences of any actions
> taken on the basis of the information provided, unless that information is
> subsequently confirmed in writing. Please note that any views or opinions
> presented in this email are solely those of the author and do not
> necessarily represent those of the company. Finally, the recipient should
> check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
> ___
> 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


[Interest] [Qt5.x] QComboBox-related crash

2016-08-19 Thread Andy
king the dialog's temporary ownership of the form

Anyone with some in-depth knowledge of the QComboBox have any ideas what
might be going on here?

Thank you for your time.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt5.x] QComboBox-related crash

2016-08-22 Thread Andy
Thanks Viktor.

Possibly related, thanks for something else to look into.  FWIW I'm not
using WebEngine nor do I have it installed.  Just straight old C++ Qt
widgets.

I have not made any progress on this though, so if there aren't any other
suggestions/input I'll try to make a small example to repro it and file a
bug.


---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Mon, Aug 22, 2016 at 4:18 AM, Viktor Engelmann 
wrote:

> could be related to one of these:
>
> https://bugreports.qt.io/browse/QTBUG-55134
> https://bugreports.qt.io/browse/QTBUG-55135
> https://bugreports.qt.io/browse/QTBUG-55158
>
>
>
> On 20.08.2016 00:09, Andy wrote:
>
> This has me stumped.
>
> Problem:
>
> I have an app with plugins.  Each plugin has a form widget which is
> displayed in a dialog.
>
> If I bring up the dialog and click a QComboBox within the form, when I
> quit my app I get the following in the console:
>
>   Warning: QBasicTimer::start: QBasicTimer can only be used with threads
> started with QThread(:0, (null))
>
> and the app crashes.
>
> Here's the Mac stack trace:
>
> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
> 0   org.qt-project.QtCore 0x000101ef98eb
> QThreadStorageData::get() const + 43
> 1   org.qt-project.QtGui  0x000101904d36 
> QOpenGLContext::currentContext()
> + 22
> 2   org.qt-project.QtGui  0x000101b6b483
> QPlatformBackingStorePrivate::~QPlatformBackingStorePrivate() + 19
> 3   org.qt-project.QtGui  0x000101b6b2c1
> QPlatformBackingStore::~QPlatformBackingStore() + 33
> 4   libqcocoa.dylib   0x000105168d7e
> QCocoaBackingStore::~QCocoaBackingStore() + 14
> 5   org.qt-project.QtGui  0x000101a6b8cc
> QBackingStore::~QBackingStore() + 28
> 6   org.qt-project.QtWidgets  0x0001011fa5fc
> deleteBackingStore(QWidgetPrivate*) + 204
> 7   org.qt-project.QtWidgets  0x0001011fa408 
> QWidgetPrivate::deleteTLSysExtra()
> + 56
> 8   org.qt-project.QtWidgets  0x0001011fa172
> QWidget::destroy(bool, bool) + 834
> 9   org.qt-project.QtWidgets  0x0001011f98d6
> QWidget::~QWidget() + 1462
> 10  org.qt-project.QtWidgets  0x0001012d753e
> QComboBoxPrivateContainer::~QComboBoxPrivateContainer() + 62
> 11  org.qt-project.QtCore 0x0001020e0a83 
> QObjectPrivate::deleteChildren()
> + 227
> 12  org.qt-project.QtWidgets  0x0001011f98ba
> QWidget::~QWidget() + 1434
> 13  org.qt-project.QtWidgets  0x0001012d03f7
> QComboBox::~QComboBox() + 71
> 14  org.qt-project.QtCore 0x0001020e0a83 
> QObjectPrivate::deleteChildren()
> + 227
> 15  org.qt-project.QtWidgets  0x0001011f98ba
> QWidget::~QWidget() + 1434
> 16  (my form destructor)
>
> and the Windows stack trace:
>
> 1  QThreadStorageData::get
> qthreadstorage.cpp117   0x6b79923c
> 2  qThreadStorage_localData
> qthreadstorage.h  650x3b878f0
> 3  QThreadStorage::localData
> qthreadstorage.h  139   0x3bb72dc
> 4  QOpenGLContext::currentContext
>qopenglcontext.cpp415
> 0x388b59b
> 5  QPlatformBackingStorePrivate::~QPlatformBackingStorePrivate
> qplatformbackingstore.cpp 840x3be3f93
> 6  QPlatformBackingStore::~QPlatformBackingStore
> qplatformbackingstore.cpp 608   0x3a64b6a
> 7  QWindowsBackingStore::~QWindowsBackingStore
> qwindowsbackingstore.cpp  620x62891f4c
> 8  QWindowsBackingStore::~QWindowsBackingStore
> qwindowsbackingstore.cpp  650x62891f75
> 9  QBackingStore::~QBackingStore
> qbackingstore.cpp 142   0x3995f8f
> 10 deleteBackingStore
> qwidget.cpp   1858  0xef95352
> 11 QWidgetPrivate::deleteTLSysExtra
>qwidget.cpp   1875
> 0xef953e4
> 12 QWidget::destroy
> qwidget.cpp   12297 0xefad3b7
> 13 QWidget::~QWidget
> qwidget.cpp   1679  0xef94c46
> 14 QFrame::~QFrame
> qframe.cpp256   0xf0b3d8a
> 15 QComboBoxPrivateContainer::~QComboBoxPrivateContainer
> qcombobox_p.h 208   0xf2fb8f2
> 16 QComboBoxPrivateContainer::~QComboBoxPrivateContainer
> qcombobox_p.h 208   0xf2fb8a3
> 17 QObjectPrivate::deleteChildren
>qobject.cpp   1963
> 0x6b8f6ed7
> 18 QWidget::~QWidget
> qwidget.cpp   1674  0xef94c18
> 19 QComboBox::~QComboBox
> qcombobox.cpp 1332  0xf088949
> 20 QComboBox::~QComboBox
> qcombobox.cpp 1343  0xf08897f
> 21 QObjectPrivate::del

Re: [Interest] Memory Leak when instantiating QWidget based windows

2016-09-08 Thread Andy
Mike:

If you haven't already tried it, using Qt Creator in combination with
valgrind works really well to track these kinds of things down.

The basics:

  1) install valgrind (I used homebrew)
  2) point Qt Creator at it in the prefs (Analyzer->Valgrind)
  3) Click the Debug tab, set the tool to Memcheck, and click the start
button (little green arrow)

After it runs your application (slowly), it will spit out a bunch of info
about memory leaks that make it pretty easy to track down the problems.




---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Thu, Sep 8, 2016 at 6:55 AM, Konstantin Shegunov 
wrote:

>
> On Wed, Sep 7, 2016 at 11:23 PM, Mike Jackson 
> wrote:
>
>> We monitor the memory use before and after the loop using OS X's Activity
>> monitor. At the end of the loop there is more memory being used than before
>> the loop, by about 2~3MB worth.
>>
>
> This isn't reliable. Consider the following C++ only code:
>
> int main(int argc, char ** argv)
>
> {
>
> struct X;
>
> X * x = nullptr;
>
>
> struct X {
>
> int data[1024];
>
> };
>
>
> for (qint32 i = 0; i < 10; i++)  {
>
> x = new X[1024];
>
> delete x;
>
> }
>
> return 0;
>
> }
>
>
> In the KSysGuard (KDE's system monitor) I observe for the memory consumption: 
> 12 908k, 23 048k shared before the loop and 12 944k, 25 112k shared after the 
> loop. There isn't a leak here, yet there's a difference. The OS's heap 
> manager may free the memory immediately, may cache it, or hold on to it. 
> Ultimately it's out of your control, that's why you should use a code 
> analyzer (like valgrind to track leaks).
>
>
> Kind regards.
>
>
> ___
> 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


Re: [Interest] Memory Leak when instantiating QWidget based windows

2016-09-08 Thread Andy
Ah - sorry.  I can see how that's unclear (pre-coffee email).

I meant the Debug section on the left-hand side of the main window:
Welcome, Edit, Design, Debug,...

Then the bottom pane pops up below the editor and has a dropdown at the
top-left - Debugger, Clang Static Analyzer, Memcheck,...

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Thu, Sep 8, 2016 at 9:13 AM, Edward Sutton 
wrote:

> Hi Andy,
>
> Could you please elaborate on step #3?
>
> I cannot find a Memcheck option under Preferences > Debugger.
>
> Thanks for the tips!
>
> -Ed
> Qt Creator 4.01 with Qt 5.6.1
>
>
> On Sep 8, 2016, at 7:56 AM, Andy  wrote:
>
> Mike:
>
> If you haven't already tried it, using Qt Creator in combination with
> valgrind works really well to track these kinds of things down.
>
> The basics:
>
>   1) install valgrind (I used homebrew)
>   2) point Qt Creator at it in the prefs (Analyzer->Valgrind)
>   3) Click the Debug tab, set the tool to Memcheck, and click the start
> button (little green arrow)
>
> After it runs your application (slowly), it will spit out a bunch of info
> about memory leaks that make it pretty easy to track down the problems.
>
>
>
>
> ---
> Andy Maloney  //  https://asmaloney.com
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__asmaloney.com&d=DQMFaQ&c=G4BpsyPyB19LB50bn2swXw&r=cAG2c-SQES5P2qb8IW-uwnBOCX_f2qYJIlzenFnoHUc&m=c5VUb3aKymRQx0ih8A7yljotGOJbYdQ2iJ1PDgaS508&s=r8u8ZRFO-Qd4fneoIZohXBUjpcA_h7vjbk3y92UEclg&e=>
> twitter ~ @asmaloney
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__twitter.com_asmaloney&d=DQMFaQ&c=G4BpsyPyB19LB50bn2swXw&r=cAG2c-SQES5P2qb8IW-uwnBOCX_f2qYJIlzenFnoHUc&m=c5VUb3aKymRQx0ih8A7yljotGOJbYdQ2iJ1PDgaS508&s=o5ozT95AtJLPuZ0_E6csAPsjuGwFJwioJcJtEJxKwNk&e=>
>
>
> On Thu, Sep 8, 2016 at 6:55 AM, Konstantin Shegunov 
> wrote:
>
>>
>> On Wed, Sep 7, 2016 at 11:23 PM, Mike Jackson 
>> wrote:
>>
>>> We monitor the memory use before and after the loop using OS X's
>>> Activity monitor. At the end of the loop there is more memory being used
>>> than before the loop, by about 2~3MB worth.
>>>
>>
>> This isn't reliable. Consider the following C++ only code:
>>
>> int main(int argc, char ** argv)
>>
>> {
>>
>> struct X;
>>
>> X * x = nullptr;
>>
>>
>> struct X {
>>
>> int data[1024];
>>
>> };
>>
>>
>> for (qint32 i = 0; i < 10; i++)  {
>>
>> x = new X[1024];
>>
>> delete x;
>>
>> }
>>
>> return 0;
>>
>> }
>>
>>
>> In the KSysGuard (KDE's system monitor) I observe for the memory 
>> consumption: 12 908k, 23 048k shared before the loop and 12 944k, 25 112k 
>> shared after the loop. There isn't a leak here, yet there's a difference. 
>> The OS's heap manager may free the memory immediately, may cache it, or hold 
>> on to it. Ultimately it's out of your control, that's why you should use a 
>> code analyzer (like valgrind to track leaks).
>>
>>
>> Kind regards.
>>
>>
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.qt-2Dproject.org_mailman_listinfo_interest&d=DQMFaQ&c=G4BpsyPyB19LB50bn2swXw&r=cAG2c-SQES5P2qb8IW-uwnBOCX_f2qYJIlzenFnoHUc&m=c5VUb3aKymRQx0ih8A7yljotGOJbYdQ2iJ1PDgaS508&s=LqLQXbnpsD6fQrnO0sB2UvftUi_snCYjEZU1tDFt7So&e=>
>>
>>
> ___
> Interest mailing list
> Interest@qt-project.org
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.
> qt-2Dproject.org_mailman_listinfo_interest&d=DQICAg&c=
> G4BpsyPyB19LB50bn2swXw&r=cAG2c-SQES5P2qb8IW-uwnBOCX_f2qYJIlzenFnoHUc&m=
> c5VUb3aKymRQx0ih8A7yljotGOJbYdQ2iJ1PDgaS508&s=LqLQXbnpsD6fQrnO0sB2UvftUi_
> snCYjEZU1tDFt7So&e=
>
>
> This email and any files transmitted with it from The Charles Machine
> Works, Inc. are confidential and intended solely for the use of the
> individual or entity to which they are addressed. If you have received this
> email in error please notify the sender. Our company accepts no liability
> for the contents of this email, or for the consequences of any actions
> taken on the basis of the information provided, unless that information is
> subsequently confirmed in writing. Please note that any views or opinions
> presented in this email are solely those of the author and do not
> necessarily represent those of the company. Finally, the recipient should
> check this email and any attachments for the presence of viruses. The
> company accepts no liability for any damage caused by any virus transmitted
> by this email.
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Memory Leak when instantiating QWidget based windows

2016-09-08 Thread Andy
I too am using valgrind-3.11.0 (on Mac OS X 10.10.5), but I've never seen
that in the Application Output window.  I don't usually look there when
using Memcheck.

Is there anything at all in the Memcheck panel?  Sometimes if your
application crashes when using valgrind there is useful info there.

Are you running on the debug or release version of your application?

Or could it be related this?:
https://bugreports.qt.io/browse/QTCREATORBUG-10163



---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Thu, Sep 8, 2016 at 9:37 AM, Edward Sutton 
wrote:

>
> On Sep 8, 2016, at 8:18 AM, Andy  wrote:
>
> Ah - sorry.  I can see how that's unclear (pre-coffee email).
>
> I meant the Debug section on the left-hand side of the main window:
> Welcome, Edit, Design, Debug,...
>
> >0Then the bottom pane pops up below the editor and has a dropdown at the
> top-left - Debugger, Clang Static Analyzer, Memcheck,…
>
>
> Found it! Thank you.
>
> 3.1 - Selected Memcheck in the drop-down at lower-left main edit window
> 3.2 - Press green play button to the *right* of the Memcheck drop-down
>
> Unfortunately it did not run for me.
>
> Application Output reported:
>
> Analyzing finished.
> ** Unknown error **
>
> Using valgrind-3.11.0
>
> -Ed
>
>
>
> ---
> Andy Maloney  //  https://asmaloney.com
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__asmaloney.com&d=DQMFaQ&c=G4BpsyPyB19LB50bn2swXw&r=cAG2c-SQES5P2qb8IW-uwnBOCX_f2qYJIlzenFnoHUc&m=6HvvOEegoKg93yk53OwceqGbTwWp3iEoQVNaZSRUkTM&s=bdAVC6-LbUYQycT9JFc91oa7YAOneh6j9LUG3pCqRmU&e=>
> twitter ~ @asmaloney
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__twitter.com_asmaloney&d=DQMFaQ&c=G4BpsyPyB19LB50bn2swXw&r=cAG2c-SQES5P2qb8IW-uwnBOCX_f2qYJIlzenFnoHUc&m=6HvvOEegoKg93yk53OwceqGbTwWp3iEoQVNaZSRUkTM&s=DErQyEPdZ-8bI_rhS90_nSKoH2XfmOa5EdwR_Dzu7pU&e=>
>
>
> On Thu, Sep 8, 2016 at 9:13 AM, Edward Sutton 
> wrote:
>
>> Hi Andy,
>>
>> Could you please elaborate on step #3?
>>
>> I cannot find a Memcheck option under Preferences > Debugger.
>>
>> Thanks for the tips!
>>
>> -Ed
>> Qt Creator 4.01 with Qt 5.6.1
>>
>>
>> On Sep 8, 2016, at 7:56 AM, Andy  wrote:
>>
>> Mike:
>>
>> If you haven't already tried it, using Qt Creator in combination with
>> valgrind works really well to track these kinds of things down.
>>
>> The basics:
>>
>>   1) install valgrind (I used homebrew)
>>   2) point Qt Creator at it in the prefs (Analyzer->Valgrind)
>>   3) Click the Debug tab, set the tool to Memcheck, and click the start
>> button (little green arrow)
>>
>> After it runs your application (slowly), it will spit out a bunch of info
>> about memory leaks that make it pretty easy to track down the problems.
>>
>>
>>
>>
>> ---
>> Andy Maloney  //  https://asmaloney.com
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__asmaloney.com&d=DQMFaQ&c=G4BpsyPyB19LB50bn2swXw&r=cAG2c-SQES5P2qb8IW-uwnBOCX_f2qYJIlzenFnoHUc&m=c5VUb3aKymRQx0ih8A7yljotGOJbYdQ2iJ1PDgaS508&s=r8u8ZRFO-Qd4fneoIZohXBUjpcA_h7vjbk3y92UEclg&e=>
>> twitter ~ @asmaloney
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__twitter.com_asmaloney&d=DQMFaQ&c=G4BpsyPyB19LB50bn2swXw&r=cAG2c-SQES5P2qb8IW-uwnBOCX_f2qYJIlzenFnoHUc&m=c5VUb3aKymRQx0ih8A7yljotGOJbYdQ2iJ1PDgaS508&s=o5ozT95AtJLPuZ0_E6csAPsjuGwFJwioJcJtEJxKwNk&e=>
>>
>>
>> On Thu, Sep 8, 2016 at 6:55 AM, Konstantin Shegunov 
>> wrote:
>>
>>>
>>> On Wed, Sep 7, 2016 at 11:23 PM, Mike Jackson 
>>> wrote:
>>>
>>>> We monitor the memory use before and after the loop using OS X's
>>>> Activity monitor. At the end of the loop there is more memory being used
>>>> than before the loop, by about 2~3MB worth.
>>>>
>>>
>>> This isn't reliable. Consider the following C++ only code:
>>>
>>> int main(int argc, char ** argv)
>>>
>>> {
>>>
>>> struct X;
>>>
>>> X * x = nullptr;
>>>
>>>
>>> struct X {
>>>
>>> int data[1024];
>>>
>>> };
>>>
>>>
>>> for (qint32 i = 0; i < 10; i++)  {
>>>
>>> x = new X[1024];
>>>
>>> delete x;
>>>
>>> }
>>>
>>> return 0;
>>>
>>> }
>>>
>>>
>&

Re: [Interest] Memory Leak when instantiating QWidget based windows

2016-09-10 Thread Andy
(Must be something wrong with the mail system - received this 2 days
later...)

I'm not sure if there's a suppression file in there, but with Qt Creator I
only get a handful of leaks at the end of my run that don't look like they
are related to my code.  Looks like something related to ImageLoaderMachO.

I have changed my Valigrind setting in the preferences, but I haven't set
any suppression files.

Were you ever able to get it working within Creator?  It would be worth the
effort since it parses all the results and makes it easy to jump to the
code in question.



---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Thu, Sep 8, 2016 at 5:16 PM, Mike Jackson  wrote:

> Does QtCreator come with suppression files for Qt5? I ran valgrind "by
> hand" on the command line and while I was able to actually find some of our
> leaks (yeah Valgrind..) I had to wade through 20,000 Qt leaks to find my
> leaks. Would be nice to filter those out somehow.
>
>
> --
> Michael A. Jackson
> BlueQuartz Software, LLC
> [e]: mike.jack...@bluequartz.net
>
>
> Andy wrote:
>
>> I too am using valgrind-3.11.0 (on Mac OS X 10.10.5), but I've never
>> seen that in the Application Output window.  I don't usually look there
>> when using Memcheck.
>>
>> Is there anything at all in the Memcheck panel?  Sometimes if your
>> application crashes when using valgrind there is useful info there.
>>
>> Are you running on the debug or release version of your application?
>>
>> Or could it be related this?:
>> https://bugreports.qt.io/browse/QTCREATORBUG-10163
>>
>>
>>
>> ---
>> Andy Maloney  // https://asmaloney.com
>> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>>
>>
>> On Thu, Sep 8, 2016 at 9:37 AM, Edward Sutton > <mailto:edward.sut...@subsite.com>> wrote:
>>
>>
>> On Sep 8, 2016, at 8:18 AM, Andy >> <mailto:asmalo...@gmail.com>> wrote:
>>>
>>> Ah - sorry.  I can see how that's unclear (pre-coffee email).
>>>
>>> I meant the Debug section on the left-hand side of the main
>>> window: Welcome, Edit, Design, Debug,...
>>>
>>> >0Then the bottom pane pops up below the editor and has a dropdown
>>> at the top-left - Debugger, Clang Static Analyzer, Memcheck,…
>>>
>>
>> Found it! Thank you.
>>
>> 3.1 - Selected Memcheck in the drop-down at lower-left main edit
>> window
>> 3.2 - Press green play button to the *right* of the Memcheck drop-down
>>
>> Unfortunately it did not run for me.
>>
>> Application Output reported:
>>
>> Analyzing finished.
>> ** Unknown error **
>>
>> Using valgrind-3.11.0
>>
>> -Ed
>>
>>
>>
>>> ---
>>> Andy Maloney  // https://asmaloney.com
>>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__
>>> asmaloney.com&d=DQMFaQ&c=G4BpsyPyB19LB50bn2swXw&r=cAG2c-
>>> SQES5P2qb8IW-uwnBOCX_f2qYJIlzenFnoHUc&m=6HvvOEegoKg93yk53Owc
>>> eqGbTwWp3iEoQVNaZSRUkTM&s=bdAVC6-LbUYQycT9JFc91oa7YAOneh6j9LUG3pCqRmU&e=
>>> >
>>> twitter ~ @asmaloney
>>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__
>>> twitter.com_asmaloney&d=DQMFaQ&c=G4BpsyPyB19LB50bn2swXw&r=cA
>>> G2c-SQES5P2qb8IW-uwnBOCX_f2qYJIlzenFnoHUc&m=6HvvOEegoKg93yk5
>>> 3OwceqGbTwWp3iEoQVNaZSRUkTM&s=DErQyEPdZ-8bI_rhS90_
>>> nSKoH2XfmOa5EdwR_Dzu7pU&e=>
>>>
>>>
>>> On Thu, Sep 8, 2016 at 9:13 AM, Edward Sutton
>>> mailto:edward.sut...@subsite.com>>
>>> wrote:
>>>
>>> Hi Andy,
>>>
>>> Could you please elaborate on step #3?
>>>
>>> I cannot find a Memcheck option under Preferences > Debugger.
>>>
>>> Thanks for the tips!
>>>
>>> -Ed
>>> Qt Creator 4.01 with Qt 5.6.1
>>>
>>>
>>> On Sep 8, 2016, at 7:56 AM, Andy >>> <mailto:asmalo...@gmail.com>> wrote:
>>>>
>>>> Mike:
>>>>
>>>> If you haven't already tried it, using Qt Creator in
>>>> combination with valgrind works really well to track these
>>>> kinds of things down.
>>>>
>>>> The basics:
>>>>
>>>>   1) install valgrind 

Re: [Interest] setting a widget style for a particular widget class only?

2016-09-10 Thread Andy
René:

I think you can just use QWidget::setStyle().  Haven't tried it for
QTabBar, but I use it on QButtons.

QStyle   *style = QStyleFactory::create( "fusion" );
QPushButton   *button = new QPushButton( "foo", this );
button->setStyle( style );



---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Fri, Sep 9, 2016 at 10:59 AM, René J.V. Bertin 
wrote:

> Hi,
>
> Is it possible to change the widget style for just a particular widget
> class? In stylesheet language,
>
> QTabBar { style : Fusion }
>
> This is also exactly what I'd like to accomplish, use the Fusion style for
> a QTabBar widget in a tabbed document editor, so it looks the same on all
> platforms, even on OS X with its QTabBar implementation that's appropriate
> only in dialogs with a few tabs.
>
> Alternatively
>
> Thanks,
> René
> ___
> 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


Re: [Interest] setting a widget style for a particular widget class only?

2016-09-10 Thread Andy
The docs do not specify who owns the pointer, but it looks like the object
doesn't have a parent so I would assume the caller does.

That code was not actual code from my application but, yes, I would
recommend only creating and storing the style once and releasing it
appropriately.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Sat, Sep 10, 2016 at 11:07 AM, René J.V. Bertin 
wrote:

> On Saturday September 10 2016 09:11:02 Andy wrote:
>
> Hi Andy,
>
> Thanks! I'm a bit confused that I didn't think of trying this myself, but
> it works:
>
> https://bugsfiles.kde.org/attachment.cgi?id=101015
>
> Shouldn't one release *style in the dtor?
>
> R.
>
>
> > René:
> >
> > I think you can just use QWidget::setStyle().  Haven't tried it for
> > QTabBar, but I use it on QButtons.
> >
> > QStyle   *style = QStyleFactory::create( "fusion" );
> > QPushButton   *button = new QPushButton( "foo", this );
> > button->setStyle( style );
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] setting a widget style for a particular widget class only?

2016-09-11 Thread Andy
Thanks Lorenz.

My comment was actually about the call to QStyleFactory::create().  I
wasn't sure if QStyleFactory created it and kept track of it somewhere
(only load a style once?) or if I needed to manage it myself.  Usually when
I write these kinds of methods (static methods on classes which create
things) I like to document who owns the resulting pointer so there's no
question who's going to manage the memory.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Sun, Sep 11, 2016 at 1:35 PM, Lorenz Haas  wrote:

> Just for the record - http://doc.qt.io/qt-5/qwidget.html#setStyle: The
> ownership of the style object is not transferred.
>
> 2016-09-10 17:25 GMT+02:00 Andy :
> > The docs do not specify who owns the pointer, but it looks like the
> object
> > doesn't have a parent so I would assume the caller does.
> >
> > That code was not actual code from my application but, yes, I would
> > recommend only creating and storing the style once and releasing it
> > appropriately.
> >
> > ---
> > Andy Maloney  //  https://asmaloney.com
> > twitter ~ @asmaloney
> >
> >
> > On Sat, Sep 10, 2016 at 11:07 AM, René J.V. Bertin 
> > wrote:
> >>
> >> On Saturday September 10 2016 09:11:02 Andy wrote:
> >>
> >> Hi Andy,
> >>
> >> Thanks! I'm a bit confused that I didn't think of trying this myself,
> but
> >> it works:
> >>
> >> https://bugsfiles.kde.org/attachment.cgi?id=101015
> >>
> >> Shouldn't one release *style in the dtor?
> >>
> >> R.
> >>
> >>
> >> > René:
> >> >
> >> > I think you can just use QWidget::setStyle().  Haven't tried it for
> >> > QTabBar, but I use it on QButtons.
> >> >
> >> > QStyle   *style = QStyleFactory::create( "fusion" );
> >> > QPushButton   *button = new QPushButton( "foo", this );
> >> > button->setStyle( style );
> >>
> >
> >
> > ___
> > 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
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QObject::dumpObjectTree() & const

2016-10-02 Thread Andy
Why aren't QObject::dumpObjectTree() and QObject::dumpObjectInfo() const?
Surely they shouldn't be modifying the state of the object.

I occasionally add them to my own debug dump() methods which are const
(ensures no modification is happening accidentally) and have to work around
this each time.

Obviously not a huge deal, just curious if anyone knows why that decision
was made.

Thanks!

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Advise on setting up documentation for a project (Qt Help Framework or not)

2016-10-13 Thread Andy
Elvis:

I write my manual & tutorials in HTML using a text editor - I use Atom or
TextWrangler - depends what I'm doing.  I include the HTML/css with my
application in a Documentation directory.

In my application I have items in the Help menu which open the HTML files
in the user's browser.  I also include some of this content online so
having it in HTML removes duplication of effort.

I do not provide PDFs as well - I figure if they want a PDF they can "Print
to PDF" and it's one less thing for me to maintain/verify/include.  The
documentation includes css which includes proper pagination and formatting
for printing/PDF.

(FWIW I work in a very niche market.  I might choose to do something
different if I were writing something for mass consumption or had a lot
more resources.)

Good luck!

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Thu, Oct 13, 2016 at 3:37 AM, Elvis Stansvik  wrote:

> Hi all,
>
> Sorry if this is a bit of a stream-of-conciousness style post.
>
> I've started considering providing a manual for our (Qt desktop
> widgets) application.
>
> I'm interested in what others have done.
>
> Qt has its Qt Help Framework, which AFAICS gives mostly the benefit of
> being able to interact with the help/manual content using its API
> (e.g. for What's This? or showing the full manual inside the
> application).
>
> In my case, I think we want to also provide the manual online on the
> web, and allow for the manual for a certain release to be updated on
> its own schedule, separate from the application.
>
> I imagine URLs like:
>
>/doc//manual/0.4
>/doc//manual/0.5
>...
>
> on our website.
>
> Is anyone using Qt Help and also providing the same manual online? Any
> gotchas I need to think of when using the same source HTML for online
> viewing and the compressed Qt Help file? If you're doing something
> similar, what are you using for authoring the HTML? Nothing? I was
> thinking maybe pandoc..
>
> Should I have a separate repo for the manual, with a branch for each
> release we do? (published to the URLs above).
>
> All in all, I'm very interested in how all of you Qt Widgets using
> folks do your user manuals, if you use Qt Help or not, and if you
> publish in other ways. E.g. do you provide PDFs as well?
>
> Thanks in advance,
> Elvis
> ___
> 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


Re: [Interest] Advise on setting up documentation for a project (Qt Help Framework or not)

2016-10-13 Thread Andy
On Thu, Oct 13, 2016 at 10:16 AM, Elvis Stansvik  wrote:

> Hi Andy, and thanks for sharing.
>
> 2016-10-13 15:16 GMT+02:00 Andy :
> > Elvis:
> >
> > I write my manual & tutorials in HTML using a text editor - I use Atom or
> > TextWrangler - depends what I'm doing.  I include the HTML/css with my
> > application in a Documentation directory.
> >
> > In my application I have items in the Help menu which open the HTML
> files in
> > the user's browser.  I also include some of this content online so
> having it
> > in HTML removes duplication of effort.
>
> Alright, I'm considering doing something like this myself. The reason
> I was considering pandoc or something else (like Sphinx/reST) was to
> save some typing, and also the possibility of PDF output. But maybe
> it's not worth it at this point (the User Guide will be quite short
> initially). I also see now that Sphinx support generation of a Qt .qhc
> help collection file.
>

Oh - one thing I tried but ultimately rejected for my project was Scrivener
(https://www.literatureandlatte.com/scrivener.php).  It has the nice
property of being able to export to a lot of formats (eBook, PDF, webpage,
etc.) and at the time I was thinking users might want to have a nice eBook
of the manual on their mobile device.

The drawback for me was that I use a lot of images and that made working
with it a bit cumbersome.  That was a number of years ago, so it might be
better now.  Might be worth looking at depending on your use-case.


> >
> > I do not provide PDFs as well - I figure if they want a PDF they can
> "Print
> > to PDF" and it's one less thing for me to maintain/verify/include.  The
> > documentation includes css which includes proper pagination and
> formatting
> > for printing/PDF.
>
> That's a good point, though I think my target users are quite
> PDF-oriented and might not know that they can get good output by
> printing to PDF.
>
> >
> > (FWIW I work in a very niche market.  I might choose to do something
> > different if I were writing something for mass consumption or had a lot
> more
> > resources.)
>
> My market is quite niche as well :) (we're doing a machine for
> analysis of minerals in drill cores and this is for the visualization
> tool for looking at the result).
>

That's...  pretty niche :-)


>
> >
> > Good luck!
>
> Thanks, and thanks for the input.
>
> Elvis
>
> >
> > ---
> > Andy Maloney  //  https://asmaloney.com
> > twitter ~ @asmaloney
> >
> >
> > On Thu, Oct 13, 2016 at 3:37 AM, Elvis Stansvik 
> wrote:
> >>
> >> Hi all,
> >>
> >> Sorry if this is a bit of a stream-of-conciousness style post.
> >>
> >> I've started considering providing a manual for our (Qt desktop
> >> widgets) application.
> >>
> >> I'm interested in what others have done.
> >>
> >> Qt has its Qt Help Framework, which AFAICS gives mostly the benefit of
> >> being able to interact with the help/manual content using its API
> >> (e.g. for What's This? or showing the full manual inside the
> >> application).
> >>
> >> In my case, I think we want to also provide the manual online on the
> >> web, and allow for the manual for a certain release to be updated on
> >> its own schedule, separate from the application.
> >>
> >> I imagine URLs like:
> >>
> >>/doc//manual/0.4
> >>/doc//manual/0.5
> >>...
> >>
> >> on our website.
> >>
> >> Is anyone using Qt Help and also providing the same manual online? Any
> >> gotchas I need to think of when using the same source HTML for online
> >> viewing and the compressed Qt Help file? If you're doing something
> >> similar, what are you using for authoring the HTML? Nothing? I was
> >> thinking maybe pandoc..
> >>
> >> Should I have a separate repo for the manual, with a branch for each
> >> release we do? (published to the URLs above).
> >>
> >> All in all, I'm very interested in how all of you Qt Widgets using
> >> folks do your user manuals, if you use Qt Help or not, and if you
> >> publish in other ways. E.g. do you provide PDFs as well?
> >>
> >> Thanks in advance,
> >> Elvis
> >> ___
> >> Interest mailing list
> >> Interest@qt-project.org
> >> http://lists.qt-project.org/mailman/listinfo/interest
> >
> >
>

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QGamepad on Mac OS X

2016-11-20 Thread Andy
I'm trying to get an xbox controller working on Mac OS X 10.10.5 with the
QGamepadManager and the latest 5.8 git.

First I need a driver, so I got this one:

  https://github.com/360Controller/360Controller/releases

Seems to work - the control panel recognizes the controller and responds to
input.

QGamepadManager doesn't recognize it though.  connectedGamepads() returns
an empty list.

I would expect that if the driver is properly installed, and the device is
plugged in, then QGamepadManager would recognize it.

What am I missing?

Thanks!

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QGamepad on Mac OS X

2016-11-23 Thread Andy
Maybe I'll try a more general question: Has anyone been successful at
getting an xbox controller to work on any version of Mac OS X with any
version of Qt?

Thank you for your time.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Sun, Nov 20, 2016 at 12:04 PM, Andy  wrote:

> I'm trying to get an xbox controller working on Mac OS X 10.10.5 with the
> QGamepadManager and the latest 5.8 git.
>
> First I need a driver, so I got this one:
>
>   https://github.com/360Controller/360Controller/releases
>
> Seems to work - the control panel recognizes the controller and responds
> to input.
>
> QGamepadManager doesn't recognize it though.  connectedGamepads() returns
> an empty list.
>
> I would expect that if the driver is properly installed, and the device is
> plugged in, then QGamepadManager would recognize it.
>
> What am I missing?
>
> Thanks!
>
> ---
> Andy Maloney  //  https://asmaloney.com
> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] License regarding question

2016-11-29 Thread Andy
Back to Alexander's question...

Should he choose to contribute the fixes back, signing up for, setting up,
and working with gerritt is a PIA if you aren't using it frequently.

So I would suggest reporting the bug at https://bugreports.qt.io and
attaching the fixes - then at least it exists somewhere and can be
found/looked at/integrated by someone in the future.

Thanks Alexander!

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Tue, Nov 29, 2016 at 6:57 AM, Konstantin Tokarev 
wrote:

>
>
> 29.11.2016, 14:57, "André Somers" :
> > Op 29/11/2016 om 12:01 schreef Konstantin Tokarev:
> >>  29.11.2016, 13:51, "André Somers" :
> >>>  Op 29/11/2016 om 11:42 schreef Alexander Dyagilev:
> >>>>Hello,
> >>>>
> >>>>We use Qt under LGPL license.
> >>>>
> >>>>We have found some problem in it (bug working with HTTPS on limited
> >>>>connection speed) and fixed it. We have recompiled Qt then.
> >>>>
> >>>>What do we must to do next to obey the license terms?
> >>>>
> >>>>Publish the changes somewhere?
> >>>  We ended up shipping the actual patches we made in the installer,
> >>>  putting them in a separate directory together and referencing them
> from
> >>>  the licences section in our about box. We kept around the Qt sources
> for
> >>>  the Qt we shipped with the product in the office in case anyone would
> >>>  ever ask for them (nobody ever did, of course).
> >>  Looks like a violation of LGPL. Section 6 requires you to provide
> >>  _complete_ source code or written offer to do so.
> >
> > We did offer, in the license text in the about screen.
>
> Ah, than it's probably OK
>
> > We didn't ship
> > the complete Qt sources with the product though, but we kept them them
> > around in case anyone would ever ask. Same for some other libs we used
> > and patched by the way. In my non-lawyer opinion, that is not an LGPL
> > violation.
> >
> > André
>
> --
> Regards,
> Konstantin
> ___
> 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


[Interest] [Qt3D] Qt3DWindow & access to QPickingSettings

2016-12-04 Thread Andy
I have a class which inherits from Qt3DWindow.  (Qt 5.8 latest git)

How to I access the QPickingSettings to change them? Looks like I need to
go through QRenderSettings, but that's private in Qt3DWindow and I don't
see a way to get at it.  Or is there another way for me to set them?

(I don't know if it will solve my problem - by default it "picks" backface
culled entities which is kind of useless for the user since they are
selecting an "invisible" object - not the thing they are looking at. I was
thinking this might be related to the PickMethod.)

Thanks!

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt3D - QObjectPicker & back-face culled entities

2016-12-06 Thread Andy
(Since I didn't get any response from my last question about picking I
thought I'd try asking it in a different way.)

How do I prevent the object picking mechanism from "seeing" back-face
culled entities so that it picks entities based on what the user is
actually seeing in the scene?

Thank you!

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D - QObjectPicker & back-face culled entities

2016-12-07 Thread Andy
On Wed, Dec 7, 2016 at 8:14 AM, Sean Harmer  wrote:

> On Wednesday 07 December 2016 13:03:26 Philip Schuchardt wrote:
> > It doesn't appear to be supported in the current documentation (5.7).
> > Another way to solve this is by rendering each object with a unique
> picking
> > color and the querying the pixel color under the mouse.  This could
> > probably be done by setting up a framegraph and use a RenderCapture
> > (although, I haven't gotten a RenderCapture to work).  With this
> > method, back-face culled entities will be handled correctly. One downside
> > to this method is that you'll only be able to query the closest pixel. I
> > guess you could do something like depth peeling to get other pixels, but
> > seem a bit extreme. With the pixel-based approach, you can improve
> > performance by reducing the size of the viewport. Reducing the size
> trades
> > off accuracy for performance by the way. For example squishing a 1000 x
> > 1000 pixel viewport into 10 x 10 pixel viewport would give you good
> raster
> > performance but your picking wouldn't be very accurate.
> >
> > Perhaps adding a flag to QPickerSetting to support back-face culling
> would
> > be a nice feature. Have you looked in Qt bug tracker?
>
> That's coming in 5.8. Just need to check it's working as expected...
>

Thanks guys!

Sean - that's great.  Seems like it would be a common use-case.

It leads back to my original question though - how to I get to
QPickerSettings from my Qt3DWindow-derived class? (Or will that be part of
the changes as well?)


> > Also, is the triangle picking is accelerated in any way? Or does the
> > algorithm just brute force through all the triangles?
>
> Does a broad phase check on bounding spheres first. Then traverses
> triangles.
>
> Cheers,
>
> Sean
>
> >
> > On Wed, Dec 7, 2016 at 12:41 AM Andy  wrote:
> > > (Since I didn't get any response from my last question about picking I
> > > thought I'd try asking it in a different way.)
> > >
> > > How do I prevent the object picking mechanism from "seeing" back-face
> > > culled entities so that it picks entities based on what the user is
> > > actually seeing in the scene?
> > >
> > > Thank you!
> > >
> > > ---
> > > Andy Maloney  //  https://asmaloney.com
> > > twitter ~ @asmaloney <https://twitter.com/asmaloney>
> > >
> > > ___
> > > Interest mailing list
> > > Interest@qt-project.org
> > > http://lists.qt-project.org/mailman/listinfo/interest
>
> --
> Dr Sean Harmer | sean.har...@kdab.com | Managing Director UK
> KDAB (UK) Ltd, a KDAB Group company
> Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
> Mobile: +44 (0)7545 140604
> KDAB - Qt Experts
>

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt3D - QOrbitCameraController & input control

2016-12-08 Thread Andy
Is there a plan to implement a way to customize the mouse/keyboard controls
for QOrbitCameraController?

For example the natural thing for the mouse scroll wheel is to control
zoom, but I don't see a way to add that. (Though I suppose I can submit a
patch for QOrbitCameraController.)

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D - QOrbitCameraController & input control

2016-12-08 Thread Andy
Great - thanks Sean. If I come up with anything non-horrible I'll certainly
submit it!

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Thu, Dec 8, 2016 at 2:44 PM, Sean Harmer  wrote:

> Hi,
>
> On 08/12/2016 19:08, Andy wrote:
>
>> Is there a plan to implement a way to customize the mouse/keyboard
>> controls for QOrbitCameraController?
>>
>> For example the natural thing for the mouse scroll wheel is to control
>> zoom, but I don't see a way to add that. (Though I suppose I can submit
>> a patch for QOrbitCameraController.)
>>
>
> At the moment these are just "starters for 10" and Qt3DExtras is in tech
> preview. You can copy the implementation of these and customise to suit
> your own needs for now. If you do, note that there is a new type in 5.8
> called QAxisAccumulator that can be used to treat axis values as either
> velocities or accelerations and which will integrate these up over time for
> you on the backend. This will allow us to replace the use of the
> QFrameAction component in the controllers.
>
> I'd like to get the controlers made more flexible for 5.9 indeed and
> possibly add some others in due course (3rd person maybe). Patches are
> welcome. :)
>
> Cheers,
>
> Sean
>
>
>> ---
>> Andy Maloney  //  https://asmaloney.com
>> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>>
>>
>>
>> ___
>> Interest mailing list
>> Interest@qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>>
>>
> --
> Dr Sean Harmer | sean.har...@kdab.com | Managing Director UK
> KDAB (UK) Ltd, a KDAB Group company
> Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
> Mobile: +44 (0)7545 140604
> KDAB - Qt Experts
> ___
> 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


[Interest] Qt3D - QEntity & enabling/disabling children

2016-12-12 Thread Andy
I'm trying to figure out the right QEntity/QNode structure to use for
showing/hiding/manipulating more complex objects.

I am grouping several "drawable" entities (ones with meshes and materials)
under a parent entity. When I disable the parent entity, however, the
children are not disabled. But my "drawables" each have children that *are*
disabled whenever they are disabled.

1) How is it determining whether the children should be hidden?
2) How do I group entities for showing/hiding of an entire object then?  Do
I need to implement my own GroupEntity to handle this by iterating over all
its children?
3) Is there a mechanism for this I'm missing?

Thank you!

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D - QEntity & enabling/disabling children

2016-12-13 Thread Andy
I had tried (quite a while ago) to use QLayer without success. Lacking
docs, is there a good example somewhere? (I'm using C++.) The only example
using it seems to be deferred-renderer-cpp but it doesn't help me much.

How do I filter based on specific criteria? For example, one for the
hierarchy ("I belong to this entity group") and then another one for entity
type ("I am a text label"). The goal being to show/hide either the entire
component or just the text labels in it for example. Do I add the entity's
QLayer to multiple QLayerFilters and use them somehow?

Thanks Sean.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Tue, Dec 13, 2016 at 7:23 AM, Sean Harmer  wrote:

> Hi,
>
> Propagation of enabled/disabled is currently handled per aspect as there
> are use cases for both propagating and not doing so.
>
> For the specific use case you have of hiding/showing groups of entities
> you can use the QLayer component along with QLayerFilter node(s) in your
> framegraph.
>
> Cheers,
>
> Sean
>
> On 12/12/2016 18:11, Andy wrote:
>
>> I'm trying to figure out the right QEntity/QNode structure to use for
>> showing/hiding/manipulating more complex objects.
>>
>> I am grouping several "drawable" entities (ones with meshes and
>> materials) under a parent entity. When I disable the parent entity,
>> however, the children are not disabled. But my "drawables" each have
>> children that /are/ disabled whenever they are disabled.
>>
>> 1) How is it determining whether the children should be hidden?
>> 2) How do I group entities for showing/hiding of an entire object then?
>> Do I need to implement my own GroupEntity to handle this by iterating
>> over all its children?
>> 3) Is there a mechanism for this I'm missing?
>>
>> Thank you!
>>
>> ---
>> Andy Maloney  //  https://asmaloney.com
>> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>>
>>
>>
>> ___
>> 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
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QOpenGLContext::currentContext() returning nullptr (in some cases)

2016-12-21 Thread Andy
I have some code in my application to get information about the machine's
OpenGL. For most of my customers I'm getting useful, reasonable info from
it.

For example:

"opengl": {
"format": {
"received": {
"profile": "1 [core]",
"version": "3.3"
},
"requested": {
"profile": "1 [core]",
"version": "3.3"
}
},
"vendor": "Intel",
"version": "3.3.0 - Build 20.19.15.4531",
"renderer": "Intel(R) Iris(TM) Pro Graphics 5200",
"shadingLanguage": "3.30 - Build 20.19.15.4531"


And:

"opengl": {
"format": {
"received": {
"profile": "0 [none]",
"version": "3.0"
},
"requested": {
"profile": "1 [core]",
"version": "3.3"
}
},
"vendor": "Google Inc.",
"version": "OpenGL ES 3.0 (ANGLE 2.1.99f075dade7c)",
"renderer": "ANGLE ( Direct3D11 vs_5_0 ps_5_0)",
"shadingLanguage": "OpenGL ES GLSL ES 3.00 (ANGLE
2.1.99f075dade7c)"


For some though, it's failing to get a context at all. Here's roughly what
I'm doing:

   QString  openGLInfoString()
   {
  QGLFormat   requestedFormat;

  requestedFormat.setVersion( 3, 3 );
  requestedFormat.setProfile( QGLFormat::CoreProfile );

  QGLWidget   widget( requestedFormat );

  widget.makeCurrent();

  QOpenGLFunctions  *glFuncs = nullptr;

  if ( QOpenGLContext::currentContext() == nullptr )
  {
 return "OpenGL Info Error: Could not get current context";
  }

  glFuncs = QOpenGLContext::currentContext()->functions();

  // ... do some stuff to get some nice OpenGL info about what is
actually available
  return infoString;
   }


I'm using a downloaded Qt 5.6.2 (MinGW) installer.

In what situations should I expect QOpenGLContext::currentContext() to
return a nullptr? I thought with the fallback/ANGLE stuff I could always
expect at least the ANGLE stuff to kick in - as in the second example.

Thanks for any insight!

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QOpenGLContext::currentContext() returning nullptr (in some cases)

2016-12-28 Thread Andy
(Ping) Does anybody have any insight into QOpenGLContext::currentContext()
and why it might return nullptr on some machines?

(Aside: Is there something about the way I ask questions that make them
confusing and/or difficult to answer? Too long? Not enough info? I find my
"response received" rate is low and would like to improve it :-)  Any
suggestions welcome!)

Thank you for your time.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Wed, Dec 21, 2016 at 10:00 AM, Andy  wrote:

> I have some code in my application to get information about the machine's
> OpenGL. For most of my customers I'm getting useful, reasonable info from
> it.
>
> For example:
>
> "opengl": {
> "format": {
> "received": {
> "profile": "1 [core]",
> "version": "3.3"
> },
> "requested": {
> "profile": "1 [core]",
> "version": "3.3"
> }
> },
> "vendor": "Intel",
> "version": "3.3.0 - Build 20.19.15.4531",
> "renderer": "Intel(R) Iris(TM) Pro Graphics 5200",
> "shadingLanguage": "3.30 - Build 20.19.15.4531"
>
>
> And:
>
> "opengl": {
> "format": {
> "received": {
> "profile": "0 [none]",
> "version": "3.0"
> },
> "requested": {
> "profile": "1 [core]",
> "version": "3.3"
> }
> },
> "vendor": "Google Inc.",
> "version": "OpenGL ES 3.0 (ANGLE 2.1.99f075dade7c)",
> "renderer": "ANGLE ( Direct3D11 vs_5_0 ps_5_0)",
> "shadingLanguage": "OpenGL ES GLSL ES 3.00 (ANGLE
> 2.1.99f075dade7c)"
>
>
> For some though, it's failing to get a context at all. Here's roughly what
> I'm doing:
>
>QString  openGLInfoString()
>{
>   QGLFormat   requestedFormat;
>
>   requestedFormat.setVersion( 3, 3 );
>   requestedFormat.setProfile( QGLFormat::CoreProfile );
>
>   QGLWidget   widget( requestedFormat );
>
>   widget.makeCurrent();
>
>   QOpenGLFunctions  *glFuncs = nullptr;
>
>   if ( QOpenGLContext::currentContext() == nullptr )
>   {
>  return "OpenGL Info Error: Could not get current context";
>   }
>
>   glFuncs = QOpenGLContext::currentContext()->functions();
>
>   // ... do some stuff to get some nice OpenGL info about what is
> actually available
>   return infoString;
>}
>
>
> I'm using a downloaded Qt 5.6.2 (MinGW) installer.
>
> In what situations should I expect QOpenGLContext::currentContext() to
> return a nullptr? I thought with the fallback/ANGLE stuff I could always
> expect at least the ANGLE stuff to kick in - as in the second example.
>
> Thanks for any insight!
>
> ---
> Andy Maloney  //  https://asmaloney.com
> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QOpenGLContext::currentContext() returning nullptr (in some cases)

2016-12-31 Thread Andy
On Sat, Dec 31, 2016 at 7:48 AM, Giuseppe D'Angelo <
giuseppe.dang...@kdab.com> wrote:

> Il 21/12/2016 16:00, Andy ha scritto:
> > In what situations should I expect QOpenGLContext::currentContext() to
> > return a nullptr? I thought with the fallback/ANGLE stuff I could always
> > expect at least the ANGLE stuff to kick in - as in the second example.
>
> Well, the situation is far more complex, and there's no "ANGLE
> fallback". Read the docs on Windows and its "dynamic GL" support to
> better understand the role of ANGLE in all of this.


Thanks Giuseppe.

I've read and re-read the docs but am not any clearer on an answer.

https://doc.qt.io/qt-5/windows-requirements.html#dynamically-loading-graphics-drivers
says:

"When a given environment fails to provide a proper OpenGL 2.0
implementation, it will fall back automatically to ANGLE. This fallback
will be completely transparent to the application, and will allow Qt Quick
or other OpenGL code to function by translating to Direct3D. Such a
fallback could, for example, take place on a Windows 7 PC with no
additional graphics drivers installed. On other machines, where there is
sufficient OpenGL support, the normal desktop OpenGL drivers will be used."


> Besides, ANGLE only
> provides OpenGL ES 2 (3?), so it cannot possibly provide a (Desktop)
> OpenGL 3.3 context.
>

That's fine. The way I read the docs, I should ask for what I want, and it
should return what it can handle so I know what I have to work with. If
there are no OpenGL drivers installed, it should fall back to ANGLE and
return that.

I think that's what I'm seeing "in the wild" except that sometimes it
doesn't return a context at all. That's what I'm asking about. When can
this happen?

Thank you for your time.


>
> HTH,
> --
> Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer
> KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
> KDAB - Qt, C++ and OpenGL Experts
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Finally about extends my app function ability

2017-01-16 Thread Andy
On Sun, Jan 15, 2017 at 9:09 PM, Ernesto  wrote:

> Hello, thanks again to *Bob Hood*, *Konstantin Tokarev* and *Thiago
> Macieira*.
>
> Well, in my previous mail, I show you an example project to test my doubts
> about extending app through plugin addition (in this case from Static
> Library). After reading all yours considerations several occasions and
> reading Qt Documentation about plugins. I included the plugin correctly in
> my MainApp.
>
> Here is the code:
>
> //This is header file of *Lib1*
>
> #include "lib1_global.h"
>
> #include 
>
> #include 
>
> #include 
>
> #include "../pinterface.h"
>
>
>
> class Lib1 : public QObject, public PInterface *//here I have to include
> the inherit of QObject and its macro*
>
> {
>
> Q_OBJECT
>
> Q_PLUGIN_METADATA(IID "org.Ernesto.Plugin")
>
>  *//here I miss the plugin metadata ID and allow me instantiate
> this object*
>
> Q_INTERFACES(PInterface)
>
> public:
>
> Lib1();
>
> QString *Name*() const;
>
>
>
> };
>
>
>
> //This is cpp file of *Lib1*
>
> QString Lib1::*Name*() const
>
> {
>
> return "Hello from DLL";
>
> }
>
>
>
> //This is cpp file of *MainApp*
>
> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent),ui(new Ui::
> MainWindow)
>
> {
>
> QDir plugins("C:/lib/");
>
> QStringList plugins_list = plugins.entryList(QStringList() << "*.dll",
> QDir::Files);
>
>
>
> foreach(QString filename, plugins_list) *//In this structure I
> abbreviated*
>
> {
>
> QString plugin_path = QDir::toNativeSeparators(QString("%1/%2"
> ).arg(plugins.absolutePath()).arg(filename));
>
> QPluginLoader pl(plugin_path);
>
>
>
> *//My problem was the cast type, I was usin reinterpret_cast and
> now dynamic_cast*
>
> if (PInterface* myInterface = dynamic_cast(pl.
> instance()))
>
> ui->label->setText(myInterface->*Name*());
>
> }
>
> }
>
>
>
> //This is header file of my interface, is included by both projects
>
> class PInterface *//this class was inheriting of QObject, and as Lib1
> inherits of PInterface and QObject, so PInterface can´t inherits of
> QOjects; and of course I deleted the constructor and O_OBJECT macro.*
>
> {
>
> public:
>
> virtual QString *Name*() const = 0;
>
> };
>
>
>
> Q_DECLARE_INTERFACE(PInterface, "org.Ernesto.Plugin")
>
>
>
>
>
> I can´t found an explanation of the differences of *reinterpret_cast* and
> *dynamic_cast*, because I can´t found information about *reinterpret_cast*
> in Qt Documentation (5.5.0 Qt version).
>

You will probably find that Qt doesn't have much to say about them because
they are part of the C++ language.

  http://en.cppreference.com/w/cpp/language/dynamic_cast
  http://en.cppreference.com/w/cpp/language/reinterpret_cast

...and, since you're looking at casting, you should probably know about
const_cast and static_cast as well:

  http://en.cppreference.com/w/cpp/language/const_cast
  http://en.cppreference.com/w/cpp/language/static_cast


>
> I thanks to *Steven Davidson* (from *cconclase* list), who four years ago
> taught me the *dynamic_cast* use.
>
>
>
> Regards,
>
> Ernesto
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
>
---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt3D - QObjectPicker clicked vs. pressed

2017-03-17 Thread Andy
I have an entity with a QObjectPicker component which only listens for the
"clicked" signal. (Qt 5.9 git)

If I press the mouse down on an entity, drag the mouse, and then release
the mouse, I would not expect to receive a "clicked" signal on that entity.

Given the docs, I would expect "entered", "pressed", and "exited" signals
to fire and then "released" to fire for whatever entity the mouse is over.

Is the current behaviour working as intended? If so, how do I distinguish
between a click on the entity and a click-drag using the clicked signal?


Thank you for your time.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D - QObjectPicker clicked vs. pressed

2017-03-18 Thread Andy
Thanks Mike.

So is that working as intended or should I file a JIRA for it? Seems
broken/not-as-useful-as-it-could-be...

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Sat, Mar 18, 2017 at 9:49 AM, Mike Krus  wrote:

> Hi Andy
>
> yes, I can confirm the behaviour you describe. A work around may be to
> track move events (by enabling dragging) and set a flag to ignore the click
> event? If picking is costly, you could combine the picker with a
> MouseDevice and track moves there without enabling dragging.
>
> Mike
>
> > On 17 Mar 2017, at 18:39, Andy  wrote:
> >
> > I have an entity with a QObjectPicker component which only listens for
> the "clicked" signal. (Qt 5.9 git)
> >
> > If I press the mouse down on an entity, drag the mouse, and then release
> the mouse, I would not expect to receive a "clicked" signal on that entity.
> >
> > Given the docs, I would expect "entered", "pressed", and "exited"
> signals to fire and then "released" to fire for whatever entity the mouse
> is over.
> >
> > Is the current behaviour working as intended? If so, how do I
> distinguish between a click on the entity and a click-drag using the
> clicked signal?
> >
> >
> > Thank you for your time.
> >
> > ---
> > Andy Maloney  //  https://asmaloney.com
> > twitter ~ @asmaloney
> >
> > ___
> > Interest mailing list
> > Interest@qt-project.org
> > http://lists.qt-project.org/mailman/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
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] How to make WARP as fallback after d3d11 fails

2017-03-21 Thread Andy
Kai:

Thank you for pointing at this! I think this might help explain my
unanswered question towards the end of last year (21 Dec) about seeing
machines in the wild that fail to create any OpenGL context at all. I had
assumed there was always a way to get _something_.

If I read it correctly, there are currently three cases in the default.json
which might not return a context at all since they fall back to the
software rasterizer:

- "Intel Q965/Q963 - GMA 3000 has insufficient support of opengl and
directx" (disables both ANGLE & desktop)
- "Intel GMA 3150 (QTBUG-43243), Mobile Intel 945GM (QTBUG-47435) crash"
(disables both ANGLE & desktop)
- "AMD FirePro V5900 driver causes crashes in Direct3D on Windows." (if
testDesktopGL() fails)

So if the software rasterizer fails or is not available in these cases,
QGLWidget::makeCurrent() followed by QOpenGLContext::currentContext() will
return nullptr , correct?

Aside from essentially duplicating
QWindowsOpenGLTester::detectSupportedRenderers, is there a way for me to
access the blacklist to be able to inform the user there's an issue with
their specific card? I'm not seeing a public API to find out this info.

Thanks!


---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Tue, Mar 21, 2017 at 4:09 AM, Kai Koehne  wrote:

> > -Original Message-
> > From: Interest [mailto:interest-bounces+kai.koehne=qt...@qt-project.org]
> > On Behalf Of Yuchen Deng
> > Sent: Tuesday, March 21, 2017 7:14 AM
> > To: interest@qt-project.org
> > Subject: [Interest] How to make WARP as fallback after d3d11 fails
> > hi, everyone, I have a question about OpenGL support on Windows. How can
> > I do make WARP as fallback after d3d11 fails. for now it's depends mesa's
> > opengl32sw if angle's d3d11 fail.
>
> Hi!
>
> The code that implements this logic is in
>
> qtbase\src\plugins\platforms\windows\qwindowsopengltester.cpp
>
> ook at QWindowsOpenGLTester::requestedRenderer() and
> QWindowsOpenGLTester::detectSupportedRenderers()
>
> https://code.woboq.org/qt5/qtbase/src/plugins/platforms/
> windows/qwindowsopengltester.cpp.html#_ZN20QWindowsOpenGLTester17requ
> estedRendererEv
>
> > I know to change the environment variable `set QT_OPENGL=angle` and `set
> > QT_ANGLE_PLATFORM=warp` can do that always, but I wanna when d3d11
> > fails then set WARP as fallback not depends any environment variable
> setup.
>
> QWindowsOpenGLTester::detectSupportedRenderers() defines the order in
> which the different OpenGL ES renderers on Windows are evaluated. It also
> shows that there is a blacklist feature that disables certain types. So, if
> you blacklist e.g. D3D9 Qt should directly fall back to D3d11Warp.
>
> https://code.woboq.org/qt5/qtbase/src/plugins/platforms/
> windows/qwindowsopengltester.cpp.html#_ZN20QWindowsOpenGLTester24dete
> ctSupportedRenderersERK14GpuDescriptionb
>
> Hope this helps,
>
> Kai
> ___
> 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


Re: [Interest] Anti-Aliased line drawing.

2017-03-24 Thread Andy
Bill:

I really think it depends on your use-case.

In my application I need to draw a bunch of lines (on the order of
hundreds) in a viewer-like tool and I use a QGraphicsView with
anitaliasing. Works and looks great - even when zooming in and out
dramatically. I did spend some time profiling my custom items to make sure
they weren't doing anything unnecessary.

When I tried to use an OpenGL-backed QGraphicsView - which you can do with
setViewport( new QOpenGLWidget ) - I just couldn't get it to look as clean.
Granted I didn't spend too much time on that path because what I have works
for me.

Not sure if that helps, but it might give you some ideas.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Fri, Mar 24, 2017 at 6:38 AM, william.croc...@analog.com <
william.croc...@analog.com> wrote:

> Hello:
>
> I am still hoping for some insight.
>
> What does it take to efficiently draw a good looking, anti-aliased line?
> Do I have to buy in to the use of OpenGL?
> I am just drawing lines.
>
> Thanks.
>
> Bill
> (The man who *is* who he appears to be.
>  Apparently that is not as easy as you might think.)
>
>
> On 03/16/2017 08:15 AM, william.croc...@analog.com wrote:
>
>> [This sender failed our fraud detection checks and may not be who they
>> appear to
>> be. Learn about spoofing at http://aka.ms/LearnAboutSpoofing]
>>
>> Hello:
>>
>> I am slowly porting my app forward from Qt 4.8.6
>>
>> With 4.8.6, it is my observation that simple line drawings,
>> as made by a QPainter and with Antialiasing enabled in render hints,
>> are implemented in software which makes them quite slow.
>>
>> What can I look forward to if I port my app to 5.X (5.7)
>> Is there an option for hardware acceleration
>> of AA line drawing and how would I enable it.
>>
>> I develop on RedHat Enterprise Linux 6.8
>>
>> Thanks.
>>
>> Bill
>> ___
>> 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
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt3D - Bounds of visible entities

2017-03-25 Thread Andy
Are there plans to add an interface to get the bounds of visible entities
(ones with geometry that is rendered)?

Seems like something a lot of developers would need for moving the camera
around - centering scenes, handling standard camera views (top, left,
right, etc.), zooming in to a specific object, etc..

If we do have to do it outside the framework, what would be the general
approach? I haven't quite figured out how to do it with the current public
API.

I have a QEntity-derived class, and I wanted to look for
QGeometryRenderer/QTransform components being added to it, hook in to their
signals, and calculate & store the info on the entity. But as far as I can
tell there's no way for an entity to receive notification that components
are added/removed. The addComponent() and removeComponent() methods aren't
virtual so I can't override them either.

Is there an easier approach that I'm missing?

Thanks!

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D - Bounds of visible entities

2017-03-27 Thread Andy
On Sun, Mar 26, 2017 at 5:12 AM, Mike Krus  wrote:

> Hi Andy
>
> > On 26 Mar 2017, at 00:51, Andy  wrote:
> > Are there plans to add an interface to get the bounds of visible
> entities (ones with geometry that is rendered)?
> >
> > Seems like something a lot of developers would need for moving the
> camera around - centering scenes, handling standard camera views (top,
> left, right, etc.), zooming in to a specific object, etc..
> support for some of these basic operations is in the works for 5.10. Due
> to frontend/backend split and heavy multithreading in Qt3D, it’s not
> trivial to expose such data structures directly as they are maintained by
> the backend. See https://codereview.qt-project.org/#/c/183705/ and
> previous few patches.
>

Thanks for the response Mike.

That change set looks like it would cover a lot of use-cases w.r.t. the
camera. Unfortunately 5.10 looks to be a little less than a year away
(given the current 5.9 timeline). Is there any chance something like this
could land earlier - 5.9.1?


>
> Access to bounding volume data structures will come in some form but how
> exactly is unclear yet.
>
> Also bounding volumes in the backend are computed as spheres which may or
> may not fit for your purpose (for example, they are not very useful as a
> basis for displaying a box around selected objects).
>

Right - displaying selection of objects is likely another common, obvious
use-case. Are there plans to calculate/store bounding boxes at some point?


>
> > If we do have to do it outside the framework, what would be the general
> approach? I haven't quite figured out how to do it with the current public
> API.
> >
> > I have a QEntity-derived class, and I wanted to look for
> QGeometryRenderer/QTransform components being added to it, hook in to their
> signals, and calculate & store the info on the entity. But as far as I can
> tell there's no way for an entity to receive notification that components
> are added/removed. The addComponent() and removeComponent() methods aren't
> virtual so I can't override them either.
> frontend and backend nodes don’t rely on signals and slots to communicate
> change notifications, but use change messages. There is a
> QComponentAddedChange message, but I don’t think a frontend node can listen
> to it’s own change messages.
>
> > Is there an easier approach that I'm missing?
> I think currently you would have to maintain all the necessary information
> in your application, making sure it’s updated when the scene graph changes,
> etc.
>

> Hope this helps,
>
> Mike
>
> --
> 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
>
>

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QEntity & QTransform

2017-04-05 Thread Andy
If I understand your question, there's no need to remove/add the component
- just change the QTransform. Everything will update using magic.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Wed, Apr 5, 2017 at 2:50 PM, Igor Mironchik 
wrote:

> Hello guys,
>
> Is it normal practice?
>
> removeComponent( d->m_transform );
>
> d->m_transform->setScale( 0.5f );
>
> addComponent( d->m_transform );
>
> If I want to apply changed transformation...
>
> Or for such tasks there is a better solution?
>
> ___
> 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


[Interest] QWebEngineView + QSurfaceFormat == errors in console

2017-05-04 Thread Andy
I'm looking at using QWebEngineView to generate reports. When I display the
view my application is producing a lot of errors in the console related to
OpenGL.

[79260:87779:0504/172025.710383:ERROR:gl_context_cgl.cc(136)] Error
creating context.

[79260:87779:0504/172025.710427:ERROR:gpu_command_buffer_stub.cc(590)]
Failed to create shared context for virtualization.

[79261:775:0504/172025.710803:ERROR:command_buffer_proxy_impl.cc(231)]
Failed to send GpuChannelMsg_CreateCommandBuffer.

[79261:775:0504/172025.710877:ERROR:context_provider_command_buffer.cc(262)]
GpuChannelHost failed to create command buffer.
...

To reproduce, modify the webenginewidgets example called "minimal" and add
this in main() before everything else:

   QSurfaceFormat format;


   format.setVersion( 4, 1 );

   format.setProfile( QSurfaceFormat::CoreProfile );


   QSurfaceFormat::setDefaultFormat( format );


When I run it I get these errors:

[85081:53011:0504/174550.797117:ERROR:gl_context_cgl.cc(136)] Error
creating context.

[85081:53011:0504/174550.797870:ERROR:gl_context_cgl.cc(136)] Error
creating context.

[85081:53011:0504/174550.799549:ERROR:gl_context_cgl.cc(136)] Error
creating context.

[85081:53011:0504/174550.77:ERROR:gl_context_cgl.cc(136)] Error
creating context.

GVA info: Successfully connected to the Intel plugin, offline Gen75

(macOS 10.12.4 - Qt 5.9 git)

What am I missing?

Thank you for your time.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QWebEngineView + QSurfaceFormat == errors in console

2017-05-04 Thread Andy
Thanks Thiago.

I set it to QSurfaceFormat::CompatibilityProfile and do not get the errors
in the "minimal" example or my application (just that "GVA info:" output).

However now if I open a Qt3D window in my application before the
QWebEngineView, it crashes when I show the QWebEngineView:

Fatal: QWebEngine: Default QSurfaceFormat OpenGL profile is not compatible
with the global shared context OpenGL profile. Please make sure you set a
compatible QSurfaceFormat before the QtGui application instance is
created.(render_widget_host_view_qt_delegate_widget.cpp:148,
QtWebEngineCore::RenderWidgetHostViewQtDelegateWidget::RenderWidgetHostViewQtDelegateWidget(QtWebEngineCore::RenderWidgetHostViewQtDelegateClient
*, QWidget *))

(Setting the default QSurfaceFormat is the very first thing I do in main.)

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Thu, May 4, 2017 at 6:07 PM, Thiago Macieira 
wrote:

> Em quinta-feira, 4 de maio de 2017, às 14:53:32 PDT, Andy escreveu:
> >QSurfaceFormat format;
> >
> >
> >format.setVersion( 4, 1 );
> >
> >format.setProfile( QSurfaceFormat::CoreProfile );
> >
> >
> >QSurfaceFormat::setDefaultFormat( format );
>
> Try setting to the compatibility profile or no profile.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
> ___
> 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


Re: [Interest] QWebEngineView + QSurfaceFormat == errors in console

2017-05-05 Thread Andy
Thanks Sean.

One of the problems is likely that I'm using Qt3DWindow which calls
QSurfaceFormat::setDefaultFormat() in the constructor which I've already
called in main(). I'd missed this warning in my application's output
because I have a bunch of debug output:

Warning: Warning: Setting a new default format with a different version or
profile after the global shared context is created may cause issues with
context sharing. (qsurfaceformat.cpp:770, static void
QSurfaceFormat::setDefaultFormat(const QSurfaceFormat &))

The docs say that setDefaultFormat() needs to be called before the
QGuiApplication is constructed if Qt::AA_ShareOpenGLContexts is set.

So it seems like Qt3DWindow shouldn't be setting the default format? Or
documented that it's not usable with a shared context?

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Fri, May 5, 2017 at 3:29 AM, Sean Harmer  wrote:

> On Thursday 04 May 2017 17:57:32 Thiago Macieira wrote:
> > Em quinta-feira, 4 de maio de 2017, às 16:07:12 PDT, Andy escreveu:
> > > Fatal: QWebEngine: Default QSurfaceFormat OpenGL profile is not
> compatible
> > > with the global shared context OpenGL profile. Please make sure you
> set a
> > > compatible QSurfaceFormat before the QtGui application instance is
> > > created.(render_widget_host_view_qt_delegate_widget.cpp:148,
> > > QtWebEngineCore::RenderWidgetHostViewQtDelegate
> Widget::RenderWidgetHostVie
> > > wQ tDelegateWidget(QtWebEngineCore::RenderWidgetHostViewQtDelegate
> Client
> > > *, QWidget *))
> > >
> > > (Setting the default QSurfaceFormat is the very first thing I do in
> main.)
> >
> > Looks like the Qt3D and QtWebEngine requirements for the OpenGL profile
> are
> > incompatible.
>
> Qt 3D will work with any context, compatibility or profile for modern GL
> or no
> profile for legacy GL. I assume that you actually need some GL 4.1
> features if
> that's what you're asking for. It seems like the QtWebEngine check on GL
> version/profile is broken as the compatibility profile should be, well,
> compatible with legacy GL.
>
> Cheers,
>
> Sean
>
> --
> Dr Sean Harmer | sean.har...@kdab.com | Managing Director UK
> KDAB (UK) Ltd, a KDAB Group company
> Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
> Mobile: +44 (0)7545 140604
> KDAB - Qt Experts
> ___
> 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


Re: [Interest] QWebEngineView + QSurfaceFormat == errors in console

2017-05-06 Thread Andy
Based on this discussion I have created two issue:

"QWebEngineView outputs errors when using QSurfaceFormat::CoreProfile"
https://bugreports.qt.io/browse/QTBUG-60605

"Qt3DWindow constructor should not call QSurfaceFormat::setDefaultFormat()"
https://bugreports.qt.io/browse/QTBUG-60614

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Fri, May 5, 2017 at 12:12 PM, Andy  wrote:

> Thanks Sean.
>
> One of the problems is likely that I'm using Qt3DWindow which calls
> QSurfaceFormat::setDefaultFormat() in the constructor which I've already
> called in main(). I'd missed this warning in my application's output
> because I have a bunch of debug output:
>
> Warning: Warning: Setting a new default format with a different version or
> profile after the global shared context is created may cause issues with
> context sharing. (qsurfaceformat.cpp:770, static void 
> QSurfaceFormat::setDefaultFormat(const
> QSurfaceFormat &))
>
> The docs say that setDefaultFormat() needs to be called before the
> QGuiApplication is constructed if Qt::AA_ShareOpenGLContexts is set.
>
> So it seems like Qt3DWindow shouldn't be setting the default format? Or
> documented that it's not usable with a shared context?
>
> ---
> Andy Maloney  //  https://asmaloney.com
> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>
>
> On Fri, May 5, 2017 at 3:29 AM, Sean Harmer  wrote:
>
>> On Thursday 04 May 2017 17:57:32 Thiago Macieira wrote:
>> > Em quinta-feira, 4 de maio de 2017, às 16:07:12 PDT, Andy escreveu:
>> > > Fatal: QWebEngine: Default QSurfaceFormat OpenGL profile is not
>> compatible
>> > > with the global shared context OpenGL profile. Please make sure you
>> set a
>> > > compatible QSurfaceFormat before the QtGui application instance is
>> > > created.(render_widget_host_view_qt_delegate_widget.cpp:148,
>> > > QtWebEngineCore::RenderWidgetHostViewQtDelegateWidget::
>> RenderWidgetHostVie
>> > > wQ tDelegateWidget(QtWebEngineCore::RenderWidgetHostViewQtDeleg
>> ateClient
>> > > *, QWidget *))
>> > >
>> > > (Setting the default QSurfaceFormat is the very first thing I do in
>> main.)
>> >
>> > Looks like the Qt3D and QtWebEngine requirements for the OpenGL profile
>> are
>> > incompatible.
>>
>> Qt 3D will work with any context, compatibility or profile for modern GL
>> or no
>> profile for legacy GL. I assume that you actually need some GL 4.1
>> features if
>> that's what you're asking for. It seems like the QtWebEngine check on GL
>> version/profile is broken as the compatibility profile should be, well,
>> compatible with legacy GL.
>>
>> Cheers,
>>
>> Sean
>>
>> --
>> Dr Sean Harmer | sean.har...@kdab.com | Managing Director UK
>> KDAB (UK) Ltd, a KDAB Group company
>> Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
>> Mobile: +44 (0)7545 140604
>> KDAB - Qt Experts
>> ___
>> 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


Re: [Interest] [Qt3D] Smooth orbit camera

2017-05-06 Thread Andy
Oleg:

The way I did it was to implement a QVariantAnimation-derived class that
stores the QCamera's start &end positions, view centres, and up vectors.
Then I just set the easing curve & the duration I want and call start().
Works great for my use case.

I haven't looked at the new Qt3D animation stuff, but I think its more
geared towards animated models, not moving the camera?

(In another case I use QPropertyAnimation directly to animate some arrow
drawing in my scene which also works great and is easy to set up.)

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Sat, May 6, 2017 at 1:46 PM, Oleg Evseev  wrote:

> Hi,
>
> I'm looking for solution to get smooth orbit camera in qt3d. That is for
> example when I need to change angle of observe it doesn't translate camera
> immediately, but with some delay, just like in games: when vehicle turn
> camera follow it with delay.
>
> Does it make sense to use newest Qt3D animation framework (not yet
> immersed in the study how to use it), or it would be overkill for that task
> and it would be better to write special camera controller based on
> QOrbitCameraController with custom logic for frameAction onTriggered
> handling?
>
> Maybe there are some relative examples with ready-to-use math? Will be
> much appreciate for links.
>
> Thanks for advices!
>
> --
> With best regards, Oleg.
>
> ___
> 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


[Interest] Qt5, OpenGL, and VMware

2017-05-25 Thread Andy
I run Windows using VMware Fusion on my Mac. My application uses Qt3D.

When I look at the OpenGL capabilities using "OpenGL Extensions Viewer" (
http://realtech-vr.com/admin/glview ) it tells me that it is capable of
using a 3.3 core profile:

Renderer: Gallium 0.4 on SVGA3D; build: RELEASE;  LLVM;
Vendor: VMware, Inc.
Memory: 384 MB
Version: 3.3 (Core Profile) Mesa 11.2.0 (git-b9d3786)
Shading language version: 3.30

I can run the real time test for 3.3 and it works.

No matter what I try from within Qt (5.9 RC), I can't get it to give me
that profile. This is what I get when I set the QSurfaceFormat to that:

OpenGL Info
  Vendor: VMware, Inc.
  Renderer: Gallium 0.4 on SVGA3D; build: RELEASE;  LLVM;
  Version: 3.0 Mesa 11.2.0 (git-b9d3786)
  Shading language: 1.30
  Requested format: (version 3.3, profile [core], depthBufferSize 24,
stencilBufferSize 8, rgba BufferSizes (-1, -1, -1, -1 ), samples 8,
swapBehavior 0, swapInterval 1)
  Current format:   (version 3.0, profile [none], depthBufferSize 24,
stencilBufferSize 8, rgba BufferSizes (8, 8, 8, 8 ), samples 8,
swapBehavior 2, swapInterval 1)


I've tried all different versions and CoreProfile vs. CompatibilityProfile
with no luck.

Does anyone know how to get a 3.3 context under VMware using Qt?

Thank you for your time!

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Getting access to a rendered image in Qt 3D

2017-06-19 Thread Andy
What you're probably looking for is QRenderCapture:

  https://doc.qt.io/qt-5/qt3drender-qrendercapture.html

I've used it with mixed success to save out images and create a movie using
ffmpeg - works fine on macOS, isn't working for me on Windows (see
https://bugreports.qt.io/browse/QTBUG-61223 ).

I also don't know how to set the resolution other than changing the actual
window the scene is being rendered in (maybe there's a way to do it using
offscreen rendering but I haven't figured it out).

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Mon, Jun 19, 2017 at 11:24 AM, Christensen, Matias <
matias.christen...@flir.com> wrote:

> I have a Qt application with a 3D scene using Qt 3D.
>
> What i want is to be able to render a camera at a specific resolution
> and framerate, and then to be able to access the resulting images in C++
> code so i can encode it using h264 and send it to a different process.
>
> I am having trouble finding a way to get access to the rendered image, i
> image this is made difficult as the image never leaves GPU memory and i
> need to get access to it in main memory.
>
> Does anyone have a suggestion on how i might go about doing this?
>
>
> 
>
> Notice to recipient: This email is meant for only the intended recipient
> of the transmission, and may be a communication privileged by law, subject
> to export control restrictions or that otherwise contains proprietary
> information. If you receive this email by mistake, please notify us
> immediately by replying to this message and then destroy it and do not
> review, disclose, copy or distribute it. Thank you in advance for your
> cooperation.
> ___
> 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


[Interest] "nodiscard" attribute

2017-07-08 Thread Andy
Is anyone else getting thousands of warnings about the "nodiscard"
attribute?

  warning: use of the 'nodiscard' attribute is a C++1z extension
[-Wc++1z-extensions]


macOS 10.12.5
Qt Creator 4.3.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Qt 5.9 git 5f37f812f967295165e60ce9be8ec69ad059b81a

I have CONFIG += c++14 in my .pro file.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] "nodiscard" attribute

2017-07-09 Thread Andy
Thanks Thiago.

I eventually used -Wno-c++1z-extensions so I could get working again.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Sun, Jul 9, 2017 at 2:50 PM, Thiago Macieira 
wrote:

> On sábado, 8 de julho de 2017 07:55:39 PDT Andy wrote:
> > Is anyone else getting thousands of warnings about the "nodiscard"
> > attribute?
> >
> >   warning: use of the 'nodiscard' attribute is a C++1z extension
> > [-Wc++1z-extensions]
>
> Yes, it's a Clang bug. See https://bugs.llvm.org/show_bug.cgi?id=33518.
>
> We're working with them to figure out what the proper solution should be.
> You
> can work around this problem now by deleteing these lines from
> qcompilerdetection.h:
>
> #if QT_HAS_CPP_ATTRIBUTE(nodiscard) // P0188R1
> #  undef Q_REQUIRED_RESULT
> #  define Q_REQUIRED_RESULT [[nodiscard]]
> #endif
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
> ___
> 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


Re: [Interest] Improve ListView scrolling performance (many pictures)

2017-08-11 Thread Andy
Bernhard:

I don't use QML, but in my application I use a QAbstractItemModel-derived
class and a QTreeView-derived class to display image thumbnails in the
view. The way I make it speedy is to save the image as a thumbnail so the
view items don't need to resize the image data at all.

Maybe you could save a thumbnail of an appropriate size when you're adding
them to your model?

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Fri, Aug 11, 2017 at 3:33 AM, Bernhard B  wrote:

> Hi Vlad,
>
> you mean the QQuickAsyncImageProvider? That one sounds really promising.
> Will definitely try that out. Many thanks for the suggestion!
>
> Bernhard
>
> Am Donnerstag, 10. August 2017 schrieb Vlad Stelmahovsky :
>
>> threaded image provider might help
>>
>> On Thu, Aug 10, 2017 at 12:36 PM, Bernhard B  wrote:
>>
>>> Hi,
>>>
>>> yesterday, I also tried to replace the Base64ImageProvider approach with
>>> a subclassed QQuickPaintedItem which paints the image in it's paint method.
>>> I imagined that this approach might be faster es no bade64 decoding needs
>>> to be done. But unfortunately it looks like as it's performing even worse
>>> that way.
>>>
>>> Bernhard
>>>
>>> Am Mittwoch, 9. August 2017 schrieb Bernhard B :
>>>
>>>> Hi,
>>>>
>>>> I would need some help from you guys on how to improve the ListView's
>>>> performance. The problem is, that scrolling through my ListView sometimes
>>>> feels a little bit sluggish.
>>>>
>>>> If I only display some text in the ListView's delegate I can scroll
>>>> smoothly through my list. But as soon as there is a picture in the
>>>> ListView's delegate I notice that I can't scroll smoothly through my list
>>>> anymore. That's especially noticable if I try to scroll fast through my
>>>> list. Every time I hit a picture while scrolling through the list I can see
>>>> that there is a noticable delay until the picture is fully loaded. My
>>>> assumption is, that those pictures are the reason why he scrolling feels so
>>>> sluggish.
>>>>
>>>> My application currently works like this:
>>>>
>>>> * load 20 pictures via REST (pictures are base64 encoded)
>>>> * populate list model
>>>> * the Image component in the delegate uses a Base64ImageProvider (self
>>>> written) to access the model's base64 encoded content and displays the 
>>>> image
>>>> * if the user scrolls past a threshold another batch of base64 encoded
>>>> pictures is fetched from the server
>>>>
>>>> I also found this document: http://doc.qt.io/qt-
>>>> 5/qtquick-performance.html#rendering and tried to apply as much as
>>>> possible. In detail I applied the following changes:
>>>>
>>>> * removed complex bindings from delegate
>>>> * set sourceSize property for Image
>>>> * increased cacheBuffer a bit
>>>> * profiled with QML profiler and improved a few things
>>>>
>>>> But still, the ListView feels a bit sluggish. The strange thing is,
>>>> that it's most noticable on Android whereas on Windows and iOs it is 
>>>> better.
>>>>
>>>> Does anyone have an idea on how to improve that?
>>>>
>>>>
>>>> Any help is really appreciated.
>>>> Thanks a lot!
>>>>
>>>
>>> ___
>>> Interest mailing list
>>> Interest@qt-project.org
>>> http://lists.qt-project.org/mailman/listinfo/interest
>>>
>>>
>>
>>
>> --
>> Best regards,
>> Vlad
>>
>
> ___
> 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


Re: [Interest] Improve ListView scrolling performance (many pictures)

2017-08-11 Thread Andy
I've been using jpeg - something like this (where MAX_THUMB_DIM is 60):

void  _saveThumbnail( QImage inImage, const QString &inPath )
{
   QImage   image = inImage.scaled( MAX_THUMB_DIM, MAX_THUMB_DIM,
Qt::KeepAspectRatio, Qt::SmoothTransformation );

   QImageWriter writer( inPath, "JPEG" );

   writer.setQuality( 100 );
   writer.setOptimizedWrite( true );
   writer.setProgressiveScanWrite( true );

   writer.write( image );
}

It gives me decent-looking, reasonable sized thumbnails.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Fri, Aug 11, 2017 at 9:36 AM, Bernhard B  wrote:

> Hi Andy,
>
> many thanks for your response! I am also using a
> QAbstractListModel-derived class that gets exposed to the QML world which
> contains the images.
>
> Yesterday I started to resize the images before feeding them to the
> ListModel. According to the QML Profiler the delegate gets now created a
> little bit faster, but fast scrolling is still a little bit sluggish. Today
> I probably will play a little bit with different image codecs to see if
> those have an impact. Currently I am using *.png files often which is
> probably not the best choice.
>
> Thanks a lot for your input, really appreciated!
>
> Bernhard
>
>
> Am Freitag, 11. August 2017 schrieb Andy :
>
>> Bernhard:
>>
>> I don't use QML, but in my application I use a QAbstractItemModel-derived
>> class and a QTreeView-derived class to display image thumbnails in the
>> view. The way I make it speedy is to save the image as a thumbnail so the
>> view items don't need to resize the image data at all.
>>
>> Maybe you could save a thumbnail of an appropriate size when you're
>> adding them to your model?
>>
>> ---
>> Andy Maloney  //  https://asmaloney.com
>> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>>
>>
>> On Fri, Aug 11, 2017 at 3:33 AM, Bernhard B  wrote:
>>
>>> Hi Vlad,
>>>
>>> you mean the QQuickAsyncImageProvider? That one sounds really promising.
>>> Will definitely try that out. Many thanks for the suggestion!
>>>
>>> Bernhard
>>>
>>> Am Donnerstag, 10. August 2017 schrieb Vlad Stelmahovsky :
>>>
>>>> threaded image provider might help
>>>>
>>>> On Thu, Aug 10, 2017 at 12:36 PM, Bernhard B 
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> yesterday, I also tried to replace the Base64ImageProvider approach
>>>>> with a subclassed QQuickPaintedItem which paints the image in it's paint
>>>>> method. I imagined that this approach might be faster es no bade64 
>>>>> decoding
>>>>> needs to be done. But unfortunately it looks like as it's performing even
>>>>> worse that way.
>>>>>
>>>>> Bernhard
>>>>>
>>>>> Am Mittwoch, 9. August 2017 schrieb Bernhard B :
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I would need some help from you guys on how to improve the ListView's
>>>>>> performance. The problem is, that scrolling through my ListView sometimes
>>>>>> feels a little bit sluggish.
>>>>>>
>>>>>> If I only display some text in the ListView's delegate I can scroll
>>>>>> smoothly through my list. But as soon as there is a picture in the
>>>>>> ListView's delegate I notice that I can't scroll smoothly through my list
>>>>>> anymore. That's especially noticable if I try to scroll fast through my
>>>>>> list. Every time I hit a picture while scrolling through the list I can 
>>>>>> see
>>>>>> that there is a noticable delay until the picture is fully loaded. My
>>>>>> assumption is, that those pictures are the reason why he scrolling feels 
>>>>>> so
>>>>>> sluggish.
>>>>>>
>>>>>> My application currently works like this:
>>>>>>
>>>>>> * load 20 pictures via REST (pictures are base64 encoded)
>>>>>> * populate list model
>>>>>> * the Image component in the delegate uses a Base64ImageProvider
>>>>>> (self written) to access the model's base64 encoded content and displays
>>>>>> the image
>>>>>> * if the user scrolls past a threshold another batch of base64
>>>>>> encoded pictures is fe

[Interest] Qt3D Rendering offscreen

2017-08-11 Thread Andy
Goal: With Qt3D (C++), render my scene offscreen, use render capture on it,
and save image to disk.

With my Qt3DWindow-based solution the scene looks fine and I can do the
render capture part (on macOS anyways - Windows doesn't work for me -
https://bugreports.qt.io/browse/QTBUG-61223 ).

Now I need to be able to do it offscreen (without the window open).

I thought this was going to be as simple as setting a QOffscreenSurface as
my forward renderer surface - something like:

   QOffscreenSurface *surface = new QOffscreenSurface;

   surface->create();

   Qt3DExtras::QForwardRenderer  *forwardRenderer = new
Qt3DExtras::QForwardRenderer;

   forwardRenderer->setSurface( surface );
   forwardRenderer->setExternalRenderTargetSize( QSize( 800, 600 ) );

   qDebug() << surface->format() << surface->size() << surface->isValid();

While this gives me a valid surface and the format is correct, its size is
always (1,1) and the render capture gives me images of that size.

How do I set the size of the QOffscreenSurface?

Or am I going about this the wrong way?

(It would be nice to have a class like the Qt3DWindow one specifically for
offscreen rendering.)

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D Rendering offscreen

2017-08-12 Thread Andy
On Sat, Aug 12, 2017 at 8:40 AM, Sean Harmer  wrote:

> Hi,
>
> On Friday 11 August 2017 14:34:34 Andy wrote:
> > Goal: With Qt3D (C++), render my scene offscreen, use render capture on
> it,
> > and save image to disk.
> >
> > With my Qt3DWindow-based solution the scene looks fine and I can do the
> > render capture part (on macOS anyways - Windows doesn't work for me -
> > https://bugreports.qt.io/browse/QTBUG-61223 ).
> >
> > Now I need to be able to do it offscreen (without the window open).
> >
> > I thought this was going to be as simple as setting a QOffscreenSurface
> as
> > my forward renderer surface - something like:
> >
> >QOffscreenSurface *surface = new QOffscreenSurface;
> >
> >surface->create();
> >
> >Qt3DExtras::QForwardRenderer  *forwardRenderer = new
> > Qt3DExtras::QForwardRenderer;
> >
> >forwardRenderer->setSurface( surface );
> >forwardRenderer->setExternalRenderTargetSize( QSize( 800, 600 ) );
> >
> >qDebug() << surface->format() << surface->size() <<
> surface->isValid();
> >
> > While this gives me a valid surface and the format is correct, its size
> is
> > always (1,1) and the render capture gives me images of that size.
> >
> > How do I set the size of the QOffscreenSurface?
>
> You don't :) An offscreen surface is only good for making a GL context
> current. It is not suitable as a render target. If you want to do offscreen
>

I guess I find that class name confusing then... One draws on a surface,
right? :-)

rendering with QOffscreenSurface, you will need to provide your own render
> target in the form of a framebuffer object.
>
> You will need to create an FBO by way of a QRenderTarget with a 2D texture
> of
> the desired size attached to the color0 attachment point, and a depth
> format
> texture of the same size attached to the depth attachment point.
>

So that's a QTexture2D for colo0 and... what for the "depth format
texture"? Another QTexture2D?


>
> Select this with a QRenderTargetSelector in a custom framegraph to direct
> rendering into the attached textures. You can then do a pixel read back
> operation with the QRenderCapure and save the resulting image.
>

You make it sound so easy!


> I suppose this could be wrapped in a convenience that allows the rest of
> the
> framegraph beyond the render target selector and render capture to be set.
>

+1. If I ever get anything working, I'd be happy to work with someone to
get it into shape for Qt3DExtras.

Thanks Sean!


> Cheers,
>
> Sean
>
> >
> > Or am I going about this the wrong way?
> >
> > (It would be nice to have a class like the Qt3DWindow one specifically
> for
> > offscreen rendering.)
> >
> > ---
> > Andy Maloney  //  https://asmaloney.com
> > twitter ~ @asmaloney <https://twitter.com/asmaloney>
>
> --
> Dr Sean Harmer | sean.har...@kdab.com | Managing Director UK
> Klarälvdalens Datakonsult AB, a KDAB Group company
> Tel. UK +44 (0)1625 809908, Sweden (HQ) +46-563-540090
> KDAB - Qt Experts - Platform-independent software solutions
>

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D Rendering offscreen

2017-08-12 Thread Andy
Based on your outline, here is the hierarchy I have set up (but I still get
images of size (1,1)):

Qt3DRender::QRenderCapture::
Qt3DExtras::QForwardRenderer::
Qt3DRender::QRenderSurfaceSelector::
Qt3DRender::QViewport::
Qt3DRender::QCameraSelector::
Qt3DRender::QClearBuffers::
Qt3DRender::QFrustumCulling::
Qt3DRender::QFilterKey::
Qt3DRender::QRenderTargetSelector::
Qt3DRender::QRenderTarget::
Qt3DRender::QRenderTargetOutput::
Qt3DRender::QTexture2D::
Qt3DRender::QRenderTargetOutput::
Qt3DRender::QTexture2D::

Am I attaching things in the right place?

This is how I'm creating it:

   const QSize cTargetSize( 1024, 768 );

   m_forwardRenderer->setExternalRenderTargetSize( cTargetSize );

   Qt3DRender::QTexture2D  *color0Texture = new Qt3DRender::QTexture2D;
   color0Texture->setSize( cTargetSize.width(), cTargetSize.height() );
   color0Texture->setFormat( Qt3DRender::QAbstractTexture::RGBA32F );
   color0Texture->setGenerateMipMaps( false) ;

   Qt3DRender::QTexture2D  *depthTexture = new Qt3DRender::QTexture2D;
   depthTexture->setSize( cTargetSize.width(), cTargetSize.height() );
   depthTexture->setFormat( Qt3DRender::QAbstractTexture::D32F );
   depthTexture->setGenerateMipMaps( false );

   Qt3DRender::QRenderTargetOutput  *colorOutput = new
Qt3DRender::QRenderTargetOutput;
   colorOutput->setTexture( color0Texture );
   colorOutput->setAttachmentPoint( Qt3DRender::QRenderTargetOutput::Color0
);

   Qt3DRender::QRenderTargetOutput  *depthOutput = new
Qt3DRender::QRenderTargetOutput;
   depthOutput->setTexture( depthTexture );
   depthOutput->setAttachmentPoint( Qt3DRender::QRenderTargetOutput::Depth
);

   Qt3DRender::QRenderTarget  *renderTarget = new Qt3DRender::QRenderTarget;
   renderTarget->addOutput( colorOutput );
   renderTarget->addOutput( depthOutput );

   Qt3DRender::QRenderTargetSelector   *renderTargetSelector = new
Qt3DRender::QRenderTargetSelector( m_forwardRenderer );

   renderTargetSelector->setTarget( renderTarget );

   m_forwardRenderer->setParent( mRenderCapturer );
   m_renderSettings->setActiveFrameGraph( mRenderCapturer );


---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Sat, Aug 12, 2017 at 8:58 AM, Andy  wrote:

> On Sat, Aug 12, 2017 at 8:40 AM, Sean Harmer  wrote:
>
>> Hi,
>>
>> On Friday 11 August 2017 14:34:34 Andy wrote:
>> > Goal: With Qt3D (C++), render my scene offscreen, use render capture on
>> it,
>> > and save image to disk.
>> >
>> > With my Qt3DWindow-based solution the scene looks fine and I can do the
>> > render capture part (on macOS anyways - Windows doesn't work for me -
>> > https://bugreports.qt.io/browse/QTBUG-61223 ).
>> >
>> > Now I need to be able to do it offscreen (without the window open).
>> >
>> > I thought this was going to be as simple as setting a QOffscreenSurface
>> as
>> > my forward renderer surface - something like:
>> >
>> >QOffscreenSurface *surface = new QOffscreenSurface;
>> >
>> >surface->create();
>> >
>> >Qt3DExtras::QForwardRenderer  *forwardRenderer = new
>> > Qt3DExtras::QForwardRenderer;
>> >
>> >forwardRenderer->setSurface( surface );
>> >forwardRenderer->setExternalRenderTargetSize( QSize( 800, 600 ) );
>> >
>> >qDebug() << surface->format() << surface->size() <<
>> surface->isValid();
>> >
>> > While this gives me a valid surface and the format is correct, its size
>> is
>> > always (1,1) and the render capture gives me images of that size.
>> >
>> > How do I set the size of the QOffscreenSurface?
>>
>> You don't :) An offscreen surface is only good for making a GL context
>> current. It is not suitable as a render target. If you want to do
>> offscreen
>>
>
> I guess I find that class name confusing then... One draws on a surface,
> right? :-)
>
> rendering with QOffscreenSurface, you will need to provide your own render
>> target in the form of a framebuffer object.
>>
>> You will need to create an FBO by way of a QRenderTarget with a 2D
>> texture of
>> the desired size attached to the color0 attachment point, and a depth
>> format
>> texture of the same size attached to the depth attachment point.
>>
>
> So that's a QTexture2D for colo0 and... what for the "depth format
> texture"? Another QTexture2D?
>
>
>>
>> Selec

Re: [Interest] Improve ListView scrolling performance (many pictures)

2017-08-13 Thread Andy
Yes - it's possible to move QImage processing to another thread. I've used
QtConcurrent::run() to resize and write several images concurrently.

void SomeClass::_writeImage( QImage inImage, const QString &inPath )
{
   QFuture  future = QtConcurrent::run( [this, inImage, inPath] () {
  QImage   image = inImage;

  int   width = image.width();
  int   height = image.height();

  width += (width % 2);
  height += (height % 2);

  if ( (width != image.width()) || (height != image.height()) )
  {
 image = image.scaled( width, height, Qt::IgnoreAspectRatio,
Qt::SmoothTransformation );
  }

  QImageWriter   imageWriter( inPath );

  if ( !imageWriter.write( image) )
  {
 // error
  }
   } );

   mFutureList.append( future );
}

... later on


   for ( auto future : mFutureList )
   {
  future.waitForFinished();
   }


If you need to monitor the QFuture to do something when it's done, take a
look at QFutureWatcher: https://doc.qt.io/qt-5/qfuturewatcher.html

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Sun, Aug 13, 2017 at 4:40 PM, Bernhard B  wrote:

> Many thanks guys!
>
> I just implemented your suggestions and have to say that the scrolling
> performance definitely improved a lot. Thanks a lot for your help!
>
> However, as I am now doing more work (compress image + resize) before I
> populate the Listmodel, I noticed that there is a significant lag every
> time I fetch and process another batch of images from the server. I think
> that's due to the fact that all operations are performed in the main (GUI)
> thread.
>
> Does anyone know if it's possible to move the populating of the ListModel
> to another thread? I am aware of the WorkerScript concept, but as far as I
> know this only works for QML ListModel's and not for
> QAbstractListModel-derived models. Or is the only possibility to move the
> heavy lifiting (i.e image operations) to a separate thread and keep the
> rest in the main thread? (as Mark suggested)
>
> Thanks,
> Bernhard
>
>
>
>
> 2017-08-11 15:54 GMT+02:00 Andy :
>
>> I've been using jpeg - something like this (where MAX_THUMB_DIM is 60):
>>
>> void  _saveThumbnail( QImage inImage, const QString &inPath )
>> {
>>QImage   image = inImage.scaled( MAX_THUMB_DIM, MAX_THUMB_DIM,
>> Qt::KeepAspectRatio, Qt::SmoothTransformation );
>>
>>QImageWriter writer( inPath, "JPEG" );
>>
>>writer.setQuality( 100 );
>>writer.setOptimizedWrite( true );
>>writer.setProgressiveScanWrite( true );
>>
>>writer.write( image );
>> }
>>
>> It gives me decent-looking, reasonable sized thumbnails.
>>
>> ---
>> Andy Maloney  //  https://asmaloney.com
>> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>>
>>
>> On Fri, Aug 11, 2017 at 9:36 AM, Bernhard B  wrote:
>>
>>> Hi Andy,
>>>
>>> many thanks for your response! I am also using a
>>> QAbstractListModel-derived class that gets exposed to the QML world which
>>> contains the images.
>>>
>>> Yesterday I started to resize the images before feeding them to the
>>> ListModel. According to the QML Profiler the delegate gets now created a
>>> little bit faster, but fast scrolling is still a little bit sluggish. Today
>>> I probably will play a little bit with different image codecs to see if
>>> those have an impact. Currently I am using *.png files often which is
>>> probably not the best choice.
>>>
>>> Thanks a lot for your input, really appreciated!
>>>
>>> Bernhard
>>>
>>>
>>> Am Freitag, 11. August 2017 schrieb Andy :
>>>
>>>> Bernhard:
>>>>
>>>> I don't use QML, but in my application I use a
>>>> QAbstractItemModel-derived class and a QTreeView-derived class to display
>>>> image thumbnails in the view. The way I make it speedy is to save the image
>>>> as a thumbnail so the view items don't need to resize the image data at 
>>>> all.
>>>>
>>>> Maybe you could save a thumbnail of an appropriate size when you're
>>>> adding them to your model?
>>>>
>>>> ---
>>>> Andy Maloney  //  https://asmaloney.com
>>>> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>>>>
>>>>
>>>> On Fri, Aug 11, 2017 at 3:33 AM, Bernhard B 
>>>> wrote:
>>>>
>>>>> Hi Vlad,
>>>>>
>>>>> you 

Re: [Interest] Qt3D Rendering offscreen

2017-08-15 Thread Andy
Does anybody have any hints? I've tried all kinds of node configurations
and can't get this to work.

Thanks.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Sat, Aug 12, 2017 at 2:03 PM, Andy  wrote:

> Based on your outline, here is the hierarchy I have set up (but I still
> get images of size (1,1)):
>
> Qt3DRender::QRenderCapture::
> Qt3DExtras::QForwardRenderer::
> Qt3DRender::QRenderSurfaceSelector::
> Qt3DRender::QViewport::
> Qt3DRender::QCameraSelector::
> Qt3DRender::QClearBuffers::
> Qt3DRender::QFrustumCulling::
> Qt3DRender::QFilterKey::
> Qt3DRender::QRenderTargetSelector::
> Qt3DRender::QRenderTarget::
> Qt3DRender::QRenderTargetOutput::
> Qt3DRender::QTexture2D::
> Qt3DRender::QRenderTargetOutput::
> Qt3DRender::QTexture2D::
>
> Am I attaching things in the right place?
>
> This is how I'm creating it:
>
>const QSize cTargetSize( 1024, 768 );
>
>m_forwardRenderer->setExternalRenderTargetSize( cTargetSize );
>
>Qt3DRender::QTexture2D  *color0Texture = new Qt3DRender::QTexture2D;
>color0Texture->setSize( cTargetSize.width(), cTargetSize.height() );
>color0Texture->setFormat( Qt3DRender::QAbstractTexture::RGBA32F );
>color0Texture->setGenerateMipMaps( false) ;
>
>Qt3DRender::QTexture2D  *depthTexture = new Qt3DRender::QTexture2D;
>depthTexture->setSize( cTargetSize.width(), cTargetSize.height() );
>depthTexture->setFormat( Qt3DRender::QAbstractTexture::D32F );
>depthTexture->setGenerateMipMaps( false );
>
>Qt3DRender::QRenderTargetOutput  *colorOutput = new Qt3DRender::
> QRenderTargetOutput;
>colorOutput->setTexture( color0Texture );
>colorOutput->setAttachmentPoint( Qt3DRender::QRenderTargetOutput::Color0
> );
>
>Qt3DRender::QRenderTargetOutput  *depthOutput = new Qt3DRender::
> QRenderTargetOutput;
>depthOutput->setTexture( depthTexture );
>depthOutput->setAttachmentPoint( Qt3DRender::QRenderTargetOutput::Depth
> );
>
>Qt3DRender::QRenderTarget  *renderTarget = new
> Qt3DRender::QRenderTarget;
>renderTarget->addOutput( colorOutput );
>renderTarget->addOutput( depthOutput );
>
>Qt3DRender::QRenderTargetSelector   *renderTargetSelector = new
> Qt3DRender::QRenderTargetSelector( m_forwardRenderer );
>
>renderTargetSelector->setTarget( renderTarget );
>
>m_forwardRenderer->setParent( mRenderCapturer );
>m_renderSettings->setActiveFrameGraph( mRenderCapturer );
>
>
> ---
> Andy Maloney  //  https://asmaloney.com
> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>
>
> On Sat, Aug 12, 2017 at 8:58 AM, Andy  wrote:
>
>> On Sat, Aug 12, 2017 at 8:40 AM, Sean Harmer 
>> wrote:
>>
>>> Hi,
>>>
>>> On Friday 11 August 2017 14:34:34 Andy wrote:
>>> > Goal: With Qt3D (C++), render my scene offscreen, use render capture
>>> on it,
>>> > and save image to disk.
>>> >
>>> > With my Qt3DWindow-based solution the scene looks fine and I can do the
>>> > render capture part (on macOS anyways - Windows doesn't work for me -
>>> > https://bugreports.qt.io/browse/QTBUG-61223 ).
>>> >
>>> > Now I need to be able to do it offscreen (without the window open).
>>> >
>>> > I thought this was going to be as simple as setting a
>>> QOffscreenSurface as
>>> > my forward renderer surface - something like:
>>> >
>>> >QOffscreenSurface *surface = new QOffscreenSurface;
>>> >
>>> >surface->create();
>>> >
>>> >Qt3DExtras::QForwardRenderer  *forwardRenderer = new
>>> > Qt3DExtras::QForwardRenderer;
>>> >
>>> >forwardRenderer->setSurface( surface );
>>> >forwardRenderer->setExternalRenderTargetSize( QSize( 800, 600 ) );
>>> >
>>> >qDebug() << surface->format() << surface->size() <<
>>> surface->isValid();
>>> >
>>> > While this gives me a valid surface and the format is correct, its
>>> size is
>>> > always (1,1) and the render capture gives me images of that size.
>>> >
>>> > How do I set the size of the QOffscreenSurface?
>>>
>>> You don't :) An offscreen surface is only good for making a GL context
>>> current

Re: [Interest] Qt3D Rendering offscreen

2017-08-16 Thread Andy
On Wed, Aug 16, 2017 at 1:57 AM, Laszlo Agocs  wrote:

> The formats look a bit strange. Try rather Texture.RGBA8_UNorm and
> Texture.DepthFormat (or maybe Texture.D24) for color and depth,
> respectively.
>

Thanks Laszlo!

I was trying to follow along with the deferred-renderer-cpp manual test, so
that's where the formats came from (GBuffer).


>
> The node hierarchy looks somewhat incorrect as well. (where’s the
> Viewport/Camera/Clear for the custom render target? What is the FilterKey
> for? (are there multiple renderpasses?) etc.)
>

Right now I am just trying to get a simple forward render to offscreen
working. Basically take the Qt3DWindow and make a version for offscreen. So
the FilterKey comes from the QForwardRenderer.

I thought what I needed to do was set up the viewport/camera/clear on the
forward renderer and just change its target to the offscreen textures
using QRenderTargetSelector.
I didn't realize I needed yet another viewport and camera somewhere?

There is some QML-based example code in https://github.com/alpqr/q3dpostproc
> showing rendering into textures (in multiple passes even) and then
> compositing these on-screen, which may provide some inspiration.
>

Thanks! More examples are useful. The documentation is still very...
sparse... and I've spent a lot of time spelunking the source. It's
difficult to know where nodes are supposed to attach since it's not
generally in the documentation.

Prototyping the framegraph with QML is usually a good idea even when the
> final target is constructing it from C++ since the latter can quickly
> become hard to follow, esp. when getting started.
>

The problem is - while I've been using Qt since 2000 - I've never used QML
:-) I'll take a look.


>
> Best regards,
>
> Laszlo
>
>
>
>
>
> *From:* Interest [mailto:interest-bounces+laszlo.agocs=qt.io@qt-project.
> org] *On Behalf Of *Andy
> *Sent:* onsdag 16. august 2017 07.19
> *To:* Sean Harmer 
> *Cc:* Qt Project 
> *Subject:* Re: [Interest] Qt3D Rendering offscreen
>
>
>
> Does anybody have any hints? I've tried all kinds of node configurations
> and can't get this to work.
>
> Thanks.
>
>
> ---
> Andy Maloney  //  https://asmaloney.com
>
> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>
>
>
>
>
> On Sat, Aug 12, 2017 at 2:03 PM, Andy  wrote:
>
> Based on your outline, here is the hierarchy I have set up (but I still
> get images of size (1,1)):
>
> Qt3DRender::QRenderCapture::
> Qt3DExtras::QForwardRenderer::
> Qt3DRender::QRenderSurfaceSelector::
> Qt3DRender::QViewport::
> Qt3DRender::QCameraSelector::
> Qt3DRender::QClearBuffers::
> Qt3DRender::QFrustumCulling::
> Qt3DRender::QFilterKey::
> Qt3DRender::QRenderTargetSelector::
> Qt3DRender::QRenderTarget::
> Qt3DRender::QRenderTargetOutput::
> Qt3DRender::QTexture2D::
> Qt3DRender::QRenderTargetOutput::
> Qt3DRender::QTexture2D::
>
> Am I attaching things in the right place?
>
> This is how I'm creating it:
>
>const QSize cTargetSize( 1024, 768 );
>
>m_forwardRenderer->setExternalRenderTargetSize( cTargetSize );
>
>Qt3DRender::QTexture2D  *color0Texture = new Qt3DRender::QTexture2D;
>color0Texture->setSize( cTargetSize.width(), cTargetSize.height() );
>color0Texture->setFormat( Qt3DRender::QAbstractTexture::RGBA32F );
>color0Texture->setGenerateMipMaps( false) ;
>
>Qt3DRender::QTexture2D  *depthTexture = new Qt3DRender::QTexture2D;
>depthTexture->setSize( cTargetSize.width(), cTargetSize.height() );
>depthTexture->setFormat( Qt3DRender::QAbstractTexture::D32F );
>depthTexture->setGenerateMipMaps( false );
>
>Qt3DRender::QRenderTargetOutput  *colorOutput = new Qt3DRender::
> QRenderTargetOutput;
>colorOutput->setTexture( color0Texture );
>colorOutput->setAttachmentPoint( Qt3DRender::QRenderTargetOutput::Color0
> );
>
>Qt3DRender::QRenderTargetOutput  *depthOutput = new Qt3DRender::
> QRenderTargetOutput;
>depthOutput->setTexture( depthTexture );
>depthOutput->setAttachmentPoint( Qt3DRender::QRenderTargetOutput::Depth
> );
>
>Qt3DRender::QRenderTarget  *renderTarget = new
> Qt3DRender::QRenderTarget;
>renderTarget->addOutput( colorOutput );
>renderTarget->addOutput( depthOutput );
>
>Qt3DRender::QRenderTargetSelector   *renderTargetSelector = new
> Qt3DRender::QRenderTargetSelector( m_forwardRenderer );
>
>renderTargetSelector->setTarget( renderTarget );

Re: [Interest] QT 5.9.2 Release schedule

2017-10-05 Thread Andy
Konstantin:

You can see the high-level release plan for 5.9 here:

  https://wiki.qt.io/Qt_5.9_Release

And for more fine-grained information, you can watch the release mailing
list:

  http://lists.qt-project.org/pipermail/releasing/

According to the latter:

  "Target to get final packages for sanity checking Wed 4th October & get
the release out during this week if nothing really serious found."

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Wed, Sep 20, 2017 at 7:37 AM, Satunin, Konstantin <
konstantin.satu...@intel.com> wrote:

> Hi All,
>
>
>
> We are interested in the bug fix for memory leak https://bugreports.qt.io/
> browse/QTBUG-61754 which will be available in 5.9.2 release.
>
> QT 5.9.2 snapshot version is available since August 30, and QT 5.10 Alpha
> was released last week.
>
>
>
> Can anybody estimate when 5.9.2 might be released?
>
> Is it still according to the planned “September 2017” window (only 2 weeks
> left)?
>
>
>
> Best wishes,
>
> Satunin, Konstantin (Keeper)
>
> SSG - Sensor Developer Products
>
>
>
>
> 
> Joint Stock Company Intel A/O
> Registered legal address: Krylatsky Hills Business Park,
> 17 Krylatskaya Str., Bldg 4, Moscow 121614,
> Russian Federation
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
> ___
> 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


Re: [Interest] PostgreSQL cross compile for Pi

2017-10-07 Thread Andy
I don't really want to play the "pile on" game (and sorry for hijacking the
current thread), however as someone who cares about Qt and has been using
it for a long time this is a particular source of real frustration.

Bug reports often get labelled as "Reported" and then ignored (the
"priority" only seems to make a difference if it's a showstopper, so why
have the other levels?).

Trying to contribute is often an exercise in frustration because it can
take months for even the most trivial changes and often requires constant
hounding of the "committers" to get reviewed/committed. (When it works
though it can be awesome - it really improves the quality of the
contributions.)

This has been my experience over the years. I really want to contribute,
and I try, but it's certainly not a lot of fun (which calls to mind Lars'
talk at CppCon where one of the goals of the Qt project was to "Make
Software Development Fun & Easy").


To be fair - this isn't uniquely a Qt issue - it's kind of a drawback of
the open source model in general. It would be nice to discuss it though to
see if we can come up with some ways to improve the process for Qt and make
it easier/"more fun" for external contributors.

Concrete(ish) suggestions:

  - for documentation/comment-only changes - maybe there's a different,
faster path that could be introduced for these?
  - the main developers seem to be overwhelmed & pulled in 10 different
directions - maybe there are some tasks/processes that can be offloaded to
community members or automated?
  - are there reminder systems for "assigned" people? Maybe a weekly email
of outstanding assigned issues sorted by priority and time-in-queue would
help fewer things fall off the radar? (not sure if this already exists)
(e.g. I have one P2 bug that's been "In Progress" since May.)
  - schedule a triage week every couple of months to go through the current
backlog and reassess/re-prioritize? (again, don't know if this is done -
doesn't seem like it from the outside)

  - (insert your suggestion here)

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Sat, Oct 7, 2017 at 1:27 PM, Krzysztof Kawa 
wrote:

> I don't want to be mean Thiago, because I love Qt, I do appreciate
> your hard work and all the people that make it happen, but you need to
> consider that you're pretty big part of Qt and things around you do
> move in a different pace. It's not the same for some of us.
> As an example consider this P2 bug:
> https://bugreports.qt.io/browse/QTBUG-52108. I reported it in 5.6.2.
> It's 5.10 alpha now and it only deteriorated further.
> You could say "well then fix it yourself". I did try to start
> contributing. Take a look at this sad change log:
> https://codereview.qt-project.org/#/c/196430 - the most absurdly
> trivial 4 words of comment and it took almost 2 months to review it
> (see by who btw.) and I gave up after 7 tries to stage it. Sorry, but
> I can't imagine what it would take to add anything of substance this
> way.
>
> 2017-10-07 18:51 GMT+02:00 Thiago Macieira :
> > On Saturday, 7 October 2017 05:49:00 PDT Roland Hughes wrote:
> >> I expect, like all OpenSource bugs, it will be ignored until the version
> >> it is reported against is no longer supported, then it will become a
> >> "closed" bug.
> >
> > Except for all the bugs that I close, which are only about the open
> source
> > version. As much as possible, I work on them immediately.
> >
> > Example: *this* week in the thread "QUdpSocket on Windows 10:
> > QNetworkDatagram::destinationAddress/Port not set", I asked that a bug
> be
> > reported. It was (QTBUG-63605). I've already fixed it. It's making its
> way
> > through the verification and will be in the next release (5.9.3).
> >
> > So please take your negativity away and stop insulting those who
> actually care
> > about Qt.
> >
> > --
> > Thiago Macieira - thiago.macieira (AT) intel.com
> >   Software Architect - Intel Open Source Technology Center
> >
> > ___
> > 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
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] PostgreSQL cross compile for Pi

2017-10-07 Thread Andy
On Sat, Oct 7, 2017 at 4:11 PM, Thiago Macieira 
wrote:

> On Saturday, 7 October 2017 14:58:03 EDT Andy wrote:
> > I don't really want to play the "pile on" game (and sorry for hijacking
> the
> > current thread), however as someone who cares about Qt and has been using
> > it for a long time this is a particular source of real frustration.
> >
> > Bug reports often get labelled as "Reported" and then ignored (the
> > "priority" only seems to make a difference if it's a showstopper, so why
> > have the other levels?).
>
> Well, if we had infinite resources, we'd fix them all in priority order. We
> don't, so we fix what we can. At some point, we have to draw the line and
> cut a
> release. So yes, lower priority items will go unfixed (unless they re
> easy).
>
> They are, however, a great way for us to get new contributors. Usually, the
> lower priority items are not as complex, which allows people to "get their
> feet wet" in contributing to Qt.
>

Thanks for the response Thiago.

Yes I understand the time constraints completely. I think some of where I'm
coming from is that there are areas that feel like they are more focused on
building new stuff at the expense of documenting & fixing the older stuff.
So the balance feels off (from the outside - I'm sure there are lots of
issues at play we aren't aware of, so maybe it's just a communication
thing).

I certainly don't want to come off as ungrateful for the work all
contributors do. It's an amazing piece of technology.


> > Trying to contribute is often an exercise in frustration because it can
> > take months for even the most trivial changes and often requires constant
> > hounding of the "committers" to get reviewed/committed. (When it works
> > though it can be awesome - it really improves the quality of the
> > contributions.)
>
> I understand, and like to Krzysztof, thank you for your contributions. The
> fact that you are participating means others can focus on the complex
> things.
>
> I also share your pain. And to me it's worse because not only I have more
> changes to get reviewed, but often I am the only person who can review the
> change I made myself. According to our rules, I cannot self-approve and
> must
> make the effort to get others to review.
>
> My suggestion is that you send "ping" after a week of not getting a review.
> After another week, if it's still not approved, make sure the module's
> maintainer (me for QtCore) or the Chief Maintainer for orphaned modules is
> added to the review list, and specifically ask the maintainer for a
> decision.
> Two weeks is more than enough for at least some feedback.
>

Ok, thank you. I'm starting to do that a little more and I am seeing some
movement on things. Part of this might be cultural as well. To me bothering
someone over-and-over to do something is kind of rude, so it doesn't come
naturally :-) If that's the "accepted practice" then I'll work on my
pinging skills.


> > To be fair - this isn't uniquely a Qt issue - it's kind of a drawback of
> > the open source model in general. It would be nice to discuss it though
> to
> > see if we can come up with some ways to improve the process for Qt and
> make
> > it easier/"more fun" for external contributors.
>
> I wish I had ideas on how to do that.
>
> > Concrete(ish) suggestions:
> >
> >   - for documentation/comment-only changes - maybe there's a different,
> > faster path that could be introduced for these?
>
> That needs to be to non-.cpp files. That idea has merit, though.
>
> I remember one instance where a colleague made a simple one-line-comment
> change, I reviewed it and said ok, then we pushed. A few minutes later,
> another colleague came into our office and asked what the hell we were
> thinking,
> since we broke the build (this was before the CI existed).
>
> Turns out that we forgot the "//" to make the comment a comment.
>

:-) Yes, certainly there are hurdles, but documentation fixes/changes seem
like they should be easier somehow. Because I don't know all the Gerrit/CI
details I'm not 100% sure how this might be accomplished.

[Thinking out loud]
Can the Sanity Bot figure out if the changes are just comments? Maybe when
submitted the commits can be marked as docs only, the Sanity bot can
complain if anything else changed, and then comment-only changes can be
batched together for integration. Would avoid the issue Krzysztof mentioned
(which I've also run into).

Maybe comment-only changes only require +1?


> >   - the main developers seem to be overwhel

[Interest] What's happening w/Qt3D?

2017-10-23 Thread Andy
I just noticed that all of the Gerrit changes from KDAB contributors to
qt/qt3d have been abandoned.

What's going on?

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] What's happening w/Qt3D?

2017-10-24 Thread Andy
On Tue, Oct 24, 2017 at 5:24 AM, Sean Harmer  wrote:

> Hi Andy,
>
> On 24/10/2017 04:38, Andy wrote:
>
>> I just noticed that all of the Gerrit changes from KDAB contributors to
>> qt/qt3d have been abandoned.
>>
>> What's going on?
>>
>
> KDAB is continuing to invest and develop Qt 3D but we have temporarily
> withdrawn our contributions until senior management at The Qt Company makes
> it clear that they genuinely wish to treat the Qt Project as an Open
> Governance project and that external contributions are welcomed and valued.
>

Thank you for the explanation Sean. I hope it gets sorted out soon.

And thank you to KDAB for all the work on Qt3D and other contributions. It
is tremendously useful to the community.


> KDAB very much appreciates the support from engineers at The Qt Company
> who, like us, just wish to improve Qt for everybody. KDAB will also
> continue to support the community and we do not wish to hinder or obstruct
> any development.
>
> Rest assured that Qt 3D will continue and that we have some large
> improvements in both features and performance in the pipeline.
>

As you can tell from my bug reports and change requests I'm more interested
in working examples and proper documentation than new stuff :-)


> Kind regards,
>
> Sean
>
> --
> Dr Sean Harmer | sean.har...@kdab.com | Managing Director UK
> KDAB (UK) Ltd, a KDAB Group company
> Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
> Mobile: +44 (0)7545 140604
> KDAB - Qt Experts
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Whats the new openssl lib version to link Qt 5.10 against?

2017-10-27 Thread Andy
I think I read somewhere along the way that 5.10 has moved to OpenSSL 1.1.

The only thing I can find right now is:

  https://wiki.qt.io/New_Features_in_Qt_5.10

Under "Qt Network" -> "OpenSSL 1.1 back-end".

Maybe try linking with it instead of 1.0?

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Fri, Oct 27, 2017 at 5:56 AM, Nuno Santos 
wrote:

> Hi,
>
> I was building Qt 5.8 from the source linking with openssl 1.0.2j
>
> Yesterday I started building Qt 5.10 but it is not linking against 1.0.2j
>
> I’m not sure if this is if this is due to a new required openssl version
> or because of some building problems.
>
> Does the required openssl version changed for Qt 5.10?
>
> Thx!
>
> Regards,
>
> Nuno
> ___
> 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


Re: [Interest] Qt-3D scene file formats

2018-03-19 Thread Andy
Not sure if it helps the discussion, but taking a quick look at
AssimpImporter::assimpSupportedFormats() in
qt3d/src/plugins/sceneparsers/assimp/assimpimporter.cpp, "blend" is in fact
listed as a supported format (along with 52 other formats).

Wasn't Sean loading them in some of his examples where he was using
Blender? Or was he saving to a different format?

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Mon, Mar 19, 2018 at 2:57 PM, Andy Shaw  wrote:

> From what I was informed, Blender is not supported via Assimp, although
> Assimp indicates it as a supported format, but Qt 3D is not able to load
> it. Is this incorrect? Is Qt 3D able to load a Blender file via Assimp into
> QSceneLoader?
>
>
> Andy
> --
> *Fra:* Interest  på
> vegne av Martin Koller 
> *Sendt:* 16. mars 2018 17:11:44
> *Til:* KDAB Mike Krus
> *Kopi:* interest@qt-project.org
> *Emne:* Re: [Interest] Qt-3D scene file formats
>
> On Freitag, 16. März 2018 13:43:53 CET Mike Krus wrote:
> > Hi
> >
> > > On 16 Mar 2018, at 08:04, Martin Koller  wrote:
> > >
> > > What are the possible file formats the QSceneLoader can load (Qt 5.10,
> Linux openSuse 42.3) ?
> > > Is blender among them ?
> > SceneLoader uses Assimp internally for doing the actual parsing, please
> see [1] for the list of
> > formats that supports.
> >
> > Mike
> >
> > [1] https://github.com/assimp/assimp#supported-file-formats
>
> Thanks. This is what I already found, but Qt Support told me I'm wrong and
> the QSceneLoader can not load blender files.
> So, who is right ?
>
> BTW: The link in the Qt documentation http://doc.qt.io/qt-5/
> qt3drender-qsceneloader.html
> to the list of formats is stale.
> It points to http://www.assimp.org/main_features_formats.html
>
> --
> Best regards/Schöne Grüße
>
> Martin
> A: Because it breaks the logical sequence of discussion
> Q: Why is top posting bad?
>
> ()  ascii ribbon campaign - against html e-mail
> /\- against proprietary attachments
>
> Geschenkideen, Accessoires, Seifen, Kulinarisches: www.lillehus.at
>
>
> ___
> 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
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Qt3D] Mixing Quick3D and C++ nodes

2018-04-08 Thread Andy
I want to move my framegraph from C++ to QML. My first step is to reproduce
what's already happening with the forward renderer.

If I use a QQmlAspectEngine, should I be able to just swap out parts of the
node hierarchy for Quick3D nodes while leaving other parts C++?

For example, here is the normal tree with a forward renderer & it works:

Debug: Qt3DRender::QRenderSettings:: (:0, (null))
Debug: Qt3DRender::QRenderCapture:: (:0, (null))
Debug: Qt3DExtras::QForwardRenderer::Forward Renderer (:0,
(null))
Debug: Qt3DRender::QRenderSurfaceSelector:: (:0, (null))
Debug: Qt3DRender::QViewport:: (:0, (null))
Debug: Qt3DRender::QCameraSelector:: (:0, (null))
Debug: Qt3DRender::QClearBuffers:: (:0, (null))
Debug: Qt3DRender::QFrustumCulling:: (:0,
(null))
Debug: Qt3DRender::QFilterKey:: (:0, (null))

Then I switch out the C++ for the QML (and use setContextProperty() to
point at my C++ camera):

Debug: Qt3DRender::QRenderSettings:: (:0, (null))
Debug: Qt3DRender::QRenderCapture:: (:0, (null))
Debug: Qt3DRender::Render::Quick::Quick3DTechniqueFilter:: (:0,
(null))
Debug: Qt3DCore::Quick::Quick3DNodeV9:: (:0, (null))
Debug: Qt3DRender::QRenderSurfaceSelector:: (:0, (null))
Debug: Qt3DCore::Quick::Quick3DNodeV9:: (:0, (null))
Debug: Qt3DRender::Render::Quick::Quick3DViewport::
(:0, (null))
Debug: Qt3DCore::Quick::Quick3DNodeV9:: (:0, (null))
Debug: Qt3DCore::Quick::Quick3DNode:: (:0,
(null))   [Note: this is the CameraSelector/camera]
Debug: Qt3DCore::Quick::Quick3DNode:: (:0,
(null))
Debug: Qt3DRender::QClearBuffers:: (:0, (null))
Debug: Qt3DCore::Quick::Quick3DNodeV9::
(:0, (null))
Debug: Qt3DRender::QFrustumCulling:: (:0,
(null))
Debug: Qt3DRender::Render::Quick::Quick3DRenderPassFilter::
(:0, (null))
Debug: Qt3DRender::Render::Quick::Quick3DRenderPassFilter::
(:0, (null))
Debug: Qt3DRender::QFilterKey:: (:0, (null))

This doesn't work - doesn't render anything - am I supposed to be able to
do this? If so is there anything else I'm supposed to do to tell the engine
to use both?

(I'm using Qt 5.10.1 on macOS.)

Thank you for any insights.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] QWebEngineView, internal links, & the urlChanged signal

2018-04-13 Thread Andy
I am generating a report as an HTML document and displaying it with a
QWebEngineView. This report uses internal links such as .

I have been using the following to add "Back" and "Forward" capabilities to
a QWebEngineView:

   connect( mWebView, &QWebEngineView::urlChanged, this, [=] () {
  mUI->mActionBack->setEnabled( mWebView->history()->canGoBack() );
  mUI->mActionForward->setEnabled( mWebView->history()->canGoForward()
);
   } );

It seems that QWebEngineView::urlChanged is no longer emitted when clicking
on these internal links even though the URL has changed.

Is this a regression or should I be using a different signal? (I don't see
any that look like they apply...)

Thank you for your time.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3D] Mixing Quick3D and C++ nodes

2018-04-17 Thread Andy
Didn't get any response, so trying again.

If I'm doing this incorrectly - how would I use QML for creating
framegraphs and swap them into my QRenderSettings in C++?

Thank you.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>


On Sun, Apr 8, 2018 at 1:57 PM, Andy  wrote:

> I want to move my framegraph from C++ to QML. My first step is to
> reproduce what's already happening with the forward renderer.
>
> If I use a QQmlAspectEngine, should I be able to just swap out parts of
> the node hierarchy for Quick3D nodes while leaving other parts C++?
>
> For example, here is the normal tree with a forward renderer & it works:
>
> Debug: Qt3DRender::QRenderSettings:: (:0, (null))
> Debug: Qt3DRender::QRenderCapture:: (:0, (null))
> Debug: Qt3DExtras::QForwardRenderer::Forward Renderer (:0,
> (null))
> Debug: Qt3DRender::QRenderSurfaceSelector:: (:0, (null))
> Debug: Qt3DRender::QViewport:: (:0, (null))
> Debug: Qt3DRender::QCameraSelector:: (:0, (null))
> Debug: Qt3DRender::QClearBuffers:: (:0, (null))
> Debug: Qt3DRender::QFrustumCulling:: (:0,
> (null))
> Debug: Qt3DRender::QFilterKey:: (:0, (null))
>
> Then I switch out the C++ for the QML (and use setContextProperty() to
> point at my C++ camera):
>
> Debug: Qt3DRender::QRenderSettings:: (:0, (null))
> Debug: Qt3DRender::QRenderCapture:: (:0, (null))
> Debug: Qt3DRender::Render::Quick::Quick3DTechniqueFilter::
> (:0, (null))
> Debug: Qt3DCore::Quick::Quick3DNodeV9:: (:0, (null))
> Debug: Qt3DRender::QRenderSurfaceSelector:: (:0, (null))
> Debug: Qt3DCore::Quick::Quick3DNodeV9:: (:0, (null))
> Debug: Qt3DRender::Render::Quick::Quick3DViewport::
> (:0, (null))
> Debug: Qt3DCore::Quick::Quick3DNodeV9:: (:0,
> (null))
> Debug: Qt3DCore::Quick::Quick3DNode:: (:0,
> (null))   [Note: this is the CameraSelector/camera]
> Debug: Qt3DCore::Quick::Quick3DNode:: (:0,
> (null))
> Debug: Qt3DRender::QClearBuffers:: (:0, (null))
> Debug: Qt3DCore::Quick::Quick3DNodeV9::
> (:0, (null))
> Debug: Qt3DRender::QFrustumCulling:: (:0,
> (null))
> Debug: Qt3DRender::Render::Quick::Quick3DRenderPassFilter::
> (:0, (null))
> Debug: Qt3DRender::Render::Quick::Quick3DRenderPassFilter::
> (:0, (null))
> Debug: Qt3DRender::QFilterKey:: (:0, (null))
>
> This doesn't work - doesn't render anything - am I supposed to be able to
> do this? If so is there anything else I'm supposed to do to tell the engine
> to use both?
>
> (I'm using Qt 5.10.1 on macOS.)
>
> Thank you for any insights.
>
> ---
> Andy Maloney  //  https://asmaloney.com
> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] QDatastream, QMap, QImage serialization

2018-05-21 Thread Andy
On Mon, May 21, 2018 at 9:49 AM Thiago Macieira 
wrote:

> On Sunday, 20 May 2018 21:27:31 -03 Jason H wrote:
> > Why is QImage even a GUI type?
>
> "Has pixels" is the simplest defintiion of GUI.
>

GUI is more than that - it involves displaying said pixels. Otherwise it's
just data.

If you look at practical use cases like writing a lib or a command line
tool which processes image data, then pulling in GUI for it seems
heavy-handed.


> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Maintenance Tool network error (OSX)

2018-05-29 Thread Andy
I just tried it w/10.12.6 and I get the same error.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>



On Tue, May 29, 2018 at 11:18 AM Jason H  wrote:

> Not sure if anyone else is getting this...
>
> ___
> 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


Re: [Interest] QtGui/QList include

2018-07-04 Thread Andy
Just to confirm what Róbert found - my install of Qt 5.11.0 on macOS (using
the maintenance tool) includes this file in QtGui.framework as well.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>



On Wed, Jul 4, 2018 at 3:23 AM Manner Róbert  wrote:

> Hi,
>
> I have found a strange issue also present in Qt 5.11 with including QList
> header. In such circumstance when QtGui include path is in priority of
> QtCore, the
>
> #include 
>
> includes QEvent, not QList. This is because of a bad include present under
> QtGui:
>
> $ cat /usr/include/qt/QtGui/QList
> #include "qevent.h"
>
> Does this file serve any purpose, is it worth a bug report?
>
> Robert
> ___
> 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


[Interest] [Qt3D] QAbstractCameraController & escape key

2018-08-01 Thread Andy
Back in April, a commit added the functionality that the escape key does a
"view all" on the scene.

 https://codereview.qt-project.org/#/c/226879/

How do I prevent this? I can't figure out a way to turn it off/override it
in my derived camera controller.

I have a ground plane and a model in the middle of it and when the user
hits escape it zooms the camera way out and it looks terrible (and it's
confusing).

This feels like an application-specific functionality that doesn't belong
in this abstract base class.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3D] QAbstractCameraController & escape key

2018-08-07 Thread Andy
I filed a bug report:

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

I couldn't figure out how to turn it off through the public API, but I did
come up with a fragile hack to turn it off.

In your inherited camera controller (or, subclass one of the existing ones):

// Find and delete the escape key QActionInput.

// This is a workaround for the change to QAbstractCameraController in Qt 5.11

// which added an escape key handler that performs a "view all" on the scene.

//   https://codereview.qt-project.org/#/c/226879/

//   https://bugreports.qt.io/browse/QTBUG-69802
void inheritedCameraController::_deleteEscapeHandler()

{

   QList   list =
findChildren();


   for ( auto actionInput : list )

   {

  if ( actionInput->buttons().count() != 1 )

  {

 continue;

  }


  if ( actionInput->buttons().at( 0 ) == Qt::Key_Escape )

  {

 delete actionInput;

  }

   }

}


---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>



On Wed, Aug 1, 2018 at 6:10 PM Andy  wrote:

> Back in April, a commit added the functionality that the escape key does a
> "view all" on the scene.
>
>  https://codereview.qt-project.org/#/c/226879/
>
> How do I prevent this? I can't figure out a way to turn it off/override it
> in my derived camera controller.
>
> I have a ground plane and a model in the middle of it and when the user
> hits escape it zooms the camera way out and it looks terrible (and it's
> confusing).
>
> This feels like an application-specific functionality that doesn't belong
> in this abstract base class.
>
> ---
> Andy Maloney  //  https://asmaloney.com
> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Qt3D] Issues

2018-08-10 Thread Andy
On Thu, Aug 9, 2018 at 5:38 PM Oleg Evseev  wrote:

> Hi,
>
> I wonder why FirstPersonCameraController now in qt 5.11.1 by arrow up-down
> keys moves camera up and down instead of moving forward like in games (like
> first person view should), and as it is in 5.9.5?
>

The key bindings for the Qt3DExtras camera controllers are done in
QAbstractCameraController. There isn't a way to modify them through the
API. (e.g. See my previous email to the list about the escape key and this
bug report: https://bugreports.qt.io/browse/QTBUG-69802 )


> Also qgltf.exe of qt 5.11.1 for windows "Failed to import" (without any
> other error description) for the one of my model (for both obj and 3ds
> format). qgltf.exe of qt 5.9.5 handles this obj model without problems, but
> can't import 3ds model with "Qt3D.AssimpImporter: Assimp scene import
> failed Chunk is too large".
>

I think the assimp library version changed between Qt versions. You might
try its viewer to see if it's an assimp problem:

 https://github.com/assimp/assimp


> I like that qt 5.11.1 renders objects loaded in SceneLoader with
> phongmaterial with ambient color = "white" as should - it looks similar to
> Blender, while in qt 5.9.5 I need to reduce ambient by half or objects are
> overexposed to white instead of their diffuse color.
>
> But SceneLoader of  qt 5.11.1 still has texture rendering issues that was
> fixed in qt 5.8 (QTBUG-66644) once.
>
> I mean I can't choose version. It looks like qt 3d development still can
> not be stabilize :(
>

I agree that is very frustrating. What I find even more frustrating is the
complete lack of useful documentation for the Qt3D module and the broken
examples. It's really not up to the standard of the other parts of Qt I've
worked with. I really, really want to work with it, but it's not making it
easy (or enjoyable) :-)


> --
> With regards, Oleg.
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt3D Framegraphs

2018-08-15 Thread Andy
I've been struggling with framegraphs for a very long time now and still
don't feel like I understand  their structure - what goes where or what
kind of nodes can be attached to what. I can throw a bunch of things
together, but when it doesn't work I have no idea how to track down what's
missing or what's in the wrong place.

Can anyone give an outline of what a framegraph would look like to
facilitate all of the following for a given scene:

1. rendering in a window onscreen
2. depth pass for shaders to use
3. render capture for taking "snapshots" of what the user is seeing onscreen
4. offscreen rendering of the current scene at a specified size (not the UI
window size)
5. render capture of the offscreen scene to an image

Using the forward renderer in Qt3DExtras, I can do (1) and (3), but I've
been supremely unsuccessful at implementing any of the rest despite many
many attempts - even working with the examples. (And the deferred renderer
examples - which might help? - don't work on macOS.)

I am using C++, not QML. I tried replacing my framegraph with a
QML-specified one but can't get that to work either (see previous post to
this list "[Qt3D] Mixing Quick3D and C++ nodes").

Can anyone please help? I'm stuck.

Thank you.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D Framegraphs

2018-08-21 Thread Andy
Thank you so much Paul!

That gives me something to start working on/pick apart. I see now how
onscreen vs. offscreen works and can concentrate on getting the onscreen
working the way I want first since they are very similar.

1) "I assume you want to fill the depth buffer with a simple shader right?"

I think so? Ultimately I want to experiment with a cel-shaded scene, but
for now I'd be happy with adding some black contours on my entities using
depth - slightly thicker lines closer to the camera, thinner farther away.
Is this the right setup for that?

2) "Have you tried the rendercapture ones?"

Yes I have. That's how I got my render capture working (once those examples
worked).

One thing that wasn't clear to me before was where to attach the
RenderCapture node. In the rendercapture example, it's created and then the
forward renderer is re-parented, which is what I did with mine. Your
outline makes more sense.

ClearBuffers (and NoDraw!) now make sense too. In QForwardRenderer they are
on the camera selector which seems strange.

3) If I want to use any of the "default materials" in extras - Phong,
PhongAlpha, etc - then in (3) and (4.3) the filterkeys must be
"renderingStyle"/"forward", correct? Or can I even use them anymore if I'm
going this route?

4) I will use the offscreen to generate snapshot images and video - I
assume I can turn offscreen rendering on/off dynamically by simply
enabling/disabling the RenderTargetSelector?


Thanks again for your help. I finally feel like I'm in danger of
understanding something here!


On Mon, Aug 20, 2018 at 1:20 AM Paul Lemire  wrote:

> Hi Andy,
>
> Please see my reply below
>
> On 08/15/2018 02:59 PM, Andy wrote:
>
> I've been struggling with framegraphs for a very long time now and still
> don't feel like I understand  their structure - what goes where or what
> kind of nodes can be attached to what. I can throw a bunch of things
> together, but when it doesn't work I have no idea how to track down what's
> missing or what's in the wrong place.
>
> Can anyone give an outline of what a framegraph would look like to
> facilitate all of the following for a given scene:
>
> 1. rendering in a window onscreen
> 2. depth pass for shaders to use
>
> I assume you want to fill the depth buffer with a simple shader right?
>
> 3. render capture for taking "snapshots" of what the user is seeing
> onscreen
> 4. offscreen rendering of the current scene at a specified size (not the
> UI window size)
> 5. render capture of the offscreen scene to an image
>
>
> I've not tested but the I would image what you want would look like the
> frame Graph below:
>
> RenderSurfaceSelector { // Select window to render to
>
> Viewport {
>
> // 1 Clear Color and Depth buffers
> ClearBuffers {
> buffers: ClearBuffers.ColorDepthBuffer
> NoDraw {}
> }
>
>
> // Select Camera to Use to Render Scene
> CameraSelector {
> camera: id_of_scene_camera
>
> // 2 Fill Depth Buffer pass (for screen depth buffer)
> RenderPassFilter {
> filterKeys: [ FilterKey { name: "pass"; value: "depth_fill_pass"] //
> Requires a Material which defines such a RenderPass
> }
>
> // 3 Draw screen content and use depth compare == to benefit for z fill
> passs
> RenderPassFilter {
>filterKeys: [ FilterKey { name: "pass"; value: "color_pass"] //
> Requires a Material which defines such a RenderPass
>RenderStateSet {
> renderStates: DepthTest { depthFunction: DepthTest.Equal }
> RenderCapture { // Use this to capture screen frame buffer
> id: onScreenCapture
> }
>}
> }
>
> // 4 Create FBO for offscreen rendering
> RenderTargetSelector {
> target: RenderTarget {
>   attachments: [
> RenderTargetOutput {
> attachmentPoint: RenderTargetOutput.Color0
> texture: Texture2D { width: width_of_offscreen_area;
> height: height_of_offscreen_area;  }
> },
>RenderTargetOutput {
> attachmentPoint: RenderTargetOutput.Depth
> texture: Texture2D { width: width_of_offscreen_area;
> height: height_of_offscreen_area;  }
> } ]
>} // RenderTarget
>
> // Note: ideally 4.1, 4.2 and 4.3 and 1, 2, 3 could be factored
> out as a reusable subtree (if using QML)
>
> // 4.1 Clear FBO
> ClearBuffers {
>   buffers: ClearBuffers.ColorDepthBuffer
>   NoDraw {}
>}
>
>// 4.2 Fill Depth Buffer pass (for offscreen depth buffer)
> RenderPassFilter {
> filterKey

Re: [Interest] Qt3D Framegraphs

2018-08-24 Thread Andy
Paul:

Thank you very much for the detailed responses!

This has given me a lot more to work on/understand.

The ClearBuffers part was very useful for understanding what's actually
happening. This would be good info to drop into the QClearBuffers docs.

I guess I now have to dive into render passes, render states, and materials
now. :-)

I also have a better appreciation for why most examples are QML - writing
these in C++ is time consuming and error-prone. I've written a little
(partially working) experiment to specify them in YAML so I don't have to
pull in all the QML stuff just for defining my framegraph(s). I may
continue down that road.

Have there been any thoughts/discussions on providing a non-QML way to
declare these? Could be useful for tooling (Qt Creator plugin for defining
them visually?) as well.

Thanks again for taking the time to go through this.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>



On Tue, Aug 21, 2018 at 9:10 AM Paul Lemire  wrote:

>
> On 08/21/2018 01:54 PM, Andy wrote:
>
> Thank you so much Paul!
>
> That gives me something to start working on/pick apart. I see now how
> onscreen vs. offscreen works and can concentrate on getting the onscreen
> working the way I want first since they are very similar.
>
> 1) "I assume you want to fill the depth buffer with a simple shader right?"
>
> I think so? Ultimately I want to experiment with a cel-shaded scene, but
> for now I'd be happy with adding some black contours on my entities using
> depth - slightly thicker lines closer to the camera, thinner farther away.
> Is this the right setup for that?
>
>
> Hmm that's not necessarily what I pictured. Usually a render pass where
> the depth buffer is filled is used as an optimization technique so that 1)
> You draw your scene with a very simple shader to fill the depth buffer 2)
> You draw you scene again using a more complex shader but you then take
> advantage of the fact that the GPU will only execute the fragment shader
> for fragment whose depth is equal to what is stored in the depth buffer.
>
> If you want to draw contours (which is usually referred as silhouetting)
> the technique is different. Meshes are composed of triangles which are
> specified in a given winding order (order in which the triangles vertices
> are specified, either clockwise or counterclockwise). That winding order
> can be used at draw time to distinguish between triangles which are facing
> the camera and triangles which are backfacing the camera. (Usually another
> optimization technique is to not draw backfacing triangles a.k.a backface
> culling).
>
> A possible silhouetting technique implementation can be to:
> 1) draw only the back faces of the mesh (slightly enlarged) and with depth
> writing into the depth buffer disabled.
> 2) draw the front faces of the mesh (with depth writing enabled)
>
> See http://sunandblackcat.com/tipFullView.php?l=eng&topicid=15 for a more
> detailed explaination, there are other implementation with geometry shaders
> as well (http://prideout.net/blog/?p=54)
>
> In practice, you would play with render states to control back face /
> front face culling, depth write ... e.g:
> RenderStateSet {
> renderStates: [
> DepthTest { depthFunction: DepthTest.Equal } // Specify
> which depth function to use to decide which fragments to key
> NoDepthWrite {} // Disable writing into the depth buffer
> CullFace { mode: CullFace.Front } // Cull Front faces
> (usually you would do back face culling though)
> ]
> }
>
> Note that cell shading might yet be another technique (with a different
> implementation than silhouetting). Usually it involves having steps of
> colors that vary based on light position in your fragment shader. It might
> even be simpler to implement than silhouetting actually.
>
> The above link actually implements a combination of both techniques.
>
>
>
> 2) "Have you tried the rendercapture ones?"
>
> Yes I have. That's how I got my render capture working (once those
> examples worked).
>
> One thing that wasn't clear to me before was where to attach the
> RenderCapture node. In the rendercapture example, it's created and then the
> forward renderer is re-parented, which is what I did with mine. Your
> outline makes more sense.
>
>
> I suppose it was made purely by convenience to avoid having to rewrite a
> full FrameGraph, but I do agree that makes understanding a lot harder.
>
>
> ClearBuffers (and NoDraw!) now make sense too. In QForwardRenderer they
> are on the camera selector which seems strange.
>
>
>

Re: [Interest] Qt3D Framegraphs

2018-08-31 Thread Andy
The contours/silhouetting proved a bit of a leap right now so I backed off
to look at the offscreen side of it.

I removed the depth pass and am just trying to get a simple frame graph
working for on-and-off screen capture.

I have the following frame graph (in YAML, but it should be clear):

RenderSurfaceSelector:
  Viewport:
ClearBuffers:
  buffers: ColorDepthBuffer
  clearColor: "#80faebd7"
  NoDraw: {}
CameraSelector:
  objectName: cameraSelector
  FrustumCulling: {}
  RenderPassFilter:
matchAny:
- FilterKey:
name: renderingStyle
value: forward
  RenderCapture:
objectName: onScreenCapture
  RenderTargetSelector:
target:
  RenderTarget:
attachments:
- RenderTargetOutput:
attachmentPoint: Color0
texture:
  Texture2D:
width: 512
height: 512
format: RGBAFormat
ClearBuffers:
  buffers: ColorDepthBuffer
  clearColor: "#80faebd7"
  NoDraw: {}
RenderPassFilter:
  matchAny:
  - FilterKey:
  name: renderingStyle
  value: forward
RenderCapture:
  objectName: offScreenCapture

Results of the render captures:

   onScreenCapture: https://postimg.cc/image/antf2d43h/
   offScreenCapture: https://postimg.cc/image/e7fcs5z3h/

The onscreen capture is correct - yay a forward renderer!.

1) Why isn't the offscreen one clearing the background colour using
ClearBuffers? (Isn't obvious in postimage, but the background is
transparent.) I tried moving ClearBuffers all over the place, but can't get
it to work.

2) How do I fix the aspect ratio of the offscreen image (assuming I want
the final image to be 512x512)? Do I need to give it its own camera and
adjust its aspect ratio somehow?

Thanks for any guidance!

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>



On Fri, Aug 24, 2018 at 11:24 AM Andy  wrote:

> Paul:
>
> Thank you very much for the detailed responses!
>
> This has given me a lot more to work on/understand.
>
> The ClearBuffers part was very useful for understanding what's actually
> happening. This would be good info to drop into the QClearBuffers docs.
>
> I guess I now have to dive into render passes, render states, and
> materials now. :-)
>
> I also have a better appreciation for why most examples are QML - writing
> these in C++ is time consuming and error-prone. I've written a little
> (partially working) experiment to specify them in YAML so I don't have to
> pull in all the QML stuff just for defining my framegraph(s). I may
> continue down that road.
>
> Have there been any thoughts/discussions on providing a non-QML way to
> declare these? Could be useful for tooling (Qt Creator plugin for defining
> them visually?) as well.
>
> Thanks again for taking the time to go through this.
>
> ---
> Andy Maloney  //  https://asmaloney.com
> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>
>
>
> On Tue, Aug 21, 2018 at 9:10 AM Paul Lemire  wrote:
>
>>
>> On 08/21/2018 01:54 PM, Andy wrote:
>>
>> Thank you so much Paul!
>>
>> That gives me something to start working on/pick apart. I see now how
>> onscreen vs. offscreen works and can concentrate on getting the onscreen
>> working the way I want first since they are very similar.
>>
>> 1) "I assume you want to fill the depth buffer with a simple shader
>> right?"
>>
>> I think so? Ultimately I want to experiment with a cel-shaded scene, but
>> for now I'd be happy with adding some black contours on my entities using
>> depth - slightly thicker lines closer to the camera, thinner farther away.
>> Is this the right setup for that?
>>
>>
>> Hmm that's not necessarily what I pictured. Usually a render pass where
>> the depth buffer is filled is used as an optimization technique so that 1)
>> You draw your scene with a very simple shader to fill the depth buffer 2)
>> You draw you scene again using a more complex shader but you then take
>> advantage of the fact that the GPU will only execute the fragment shader
>> for fragment whose depth is equal to what is stored in the depth buffer.
>>
>> If you want to draw contours (which is usually referred as silhouetting)
>> the technique is different. Meshes are composed of triangles which are
>> specified in a given winding order (order in which the triangles vertices
>> are specified, either clockwise or counterclockwise). That winding order
>> can be used at draw time to distinguish between 

Re: [Interest] Qt3D Framegraphs

2018-08-31 Thread Andy
On Fri, Aug 31, 2018 at 10:30 AM Paul Lemire  wrote:

> Hi Andy,
> Some ideas below :)
>

Thanks a lot Paul - answers inline.


> On 08/31/2018 02:03 PM, Andy wrote:
>
> The contours/silhouetting proved a bit of a leap right now so I backed off
> to look at the offscreen side of it.
>
> I removed the depth pass and am just trying to get a simple frame graph
> working for on-and-off screen capture.
>
> I have the following frame graph (in YAML, but it should be clear):
>
> RenderSurfaceSelector:
>   Viewport:
> ClearBuffers:
>   buffers: ColorDepthBuffer
>   clearColor: "#80faebd7"
>   NoDraw: {}
> CameraSelector:
>   objectName: cameraSelector
>   FrustumCulling: {}
>
> Is that FrustumCulling node the parent of the RenderPassFilter or is it a
> sibling? If it's not the parent of the RenderPassFilter, I looks like it
> would be part of a Branch Viewport -> CameraSelector -> FrustumCulling
> which would be of no use here
>

Yes, I had it as a sibling of the RenderPassFilter. I didn't know where it
went, because QForwardRenderer has it on the QClearBuffers.


>   RenderPassFilter:
> matchAny:
> - FilterKey:
> name: renderingStyle
> value: forward
>   RenderCapture:
> objectName: onScreenCapture
>
> Is the render capture a child of RenderPassFilter or a sibling here? You
> might be getting lucky (or unlucky depends how you see it) because if a
> branch has no RenderPassFilter, by default we select every RenderPasses
> from every Material. So visually it might be working but it's probably not
> what you had in mind.
>

I have it as a sibling. I'll choose... "unlucky" because I thought I
understood why it was working :-)


> What I'm seeing would result in:
>
> Viewport -> ClearBuffers -> NoDraw {} -> clear screen
> Viewport -> CameraSelector -> FrustumCulling {} -> draws to screen with
> FrustumCulling (executing all passes of each material)
> Viewport -> CameraSelector -> RenderPassFilter {} -> draws to screen
> (executing only forward passes)
> Viewport -> CameraSelector -> RenderCapture {} -> capture screen
> (executing all passes of each material)
>

Ah. How do I know which types of node result in drawing? I wouldn't have
expected  FrustumCulling to draw for example - from the docs I thought that
was kind of a "command node" like NoDraw.


> I suspect what you want is rather:
> Viewport -> ClearBuffers -> NoDraw {}
> Viewport -> CameraSelector -> FrustumCulling {} -> RenderPassFilter {}
> Viewport -> CameraSelector -> FrustumCulling {} -> RenderPassFilter {} ->
> RenderCapture {}
>

> I even think that this could work:
> Viewport -> ClearBuffers -> NoDraw {}
> Viewport -> CameraSelector -> FrustumCulling {} -> RenderPassFilter {} ->
> RenderCapture {} as RenderCapture shouldn't prevent from Rendering to
> screen as well
>
>
Even if I take it all the way back to what should be the simplest (I think)
- no FrustumCulling, no capture:

RenderSurfaceSelector:
  Viewport:
ClearBuffers:
  buffers: ColorDepthBuffer
  clearColor: "#80faebd7"
  NoDraw: {}
CameraSelector:
  objectName: cameraSelector
  RenderPassFilter:
matchAny:
- FilterKey:
name: renderingStyle
value: forward

Qt3DRender::QFrameGraphNode::Custom
Qt3DRender::QRenderSurfaceSelector::
Qt3DRender::QViewport::
Qt3DRender::QClearBuffers::
Qt3DRender::QNoDraw::
Qt3DRender::QCameraSelector::cameraSelector
Qt3DRender::QRenderPassFilter::
Qt3DRender::QFilterKey::

I'm getting a cleared screen, no model.

I'm using Qt3DExtras::QPhongMaterial on my entities, so the filter key
should match, right?

Based on what you outlined above, Qt3DExtras::QForwardRenderer doesn't make
sense to me. If QFrustumCulling is doing the drawing, then what's the
purpose of the filter keys on QForwardRenderer since they aren't part of
the QRenderSurfaceSelector branch?

Qt3DExtras::QForwardRenderer::
Qt3DRender::QRenderSurfaceSelector::
Qt3DRender::QViewport::
Qt3DRender::QCameraSelector::
Qt3DRender::QClearBuffers::
Qt3DRender::QFrustumCulling::
Qt3DRender::QFilterKey::

  RenderTargetSelector:
> target:
>   RenderTarget:
> attachments:
> - RenderTargetOutput:
> attachmentPoint: Color0
> texture:
>   Texture2D:
> width: 512
> height: 512
>   

Re: [Interest] Qt3D Framegraphs

2018-09-03 Thread Andy
Progress! Here's my current framegraph:

RenderSurfaceSelector:
  Viewport:
ClearBuffers:
  buffers: ColorDepthBuffer
  clearColor: "#EEfaebd7"
  NoDraw: {}
FrustumCulling:
  # OnScreen
  CameraSelector:
objectName: onScreenCameraSelector
RenderCapture:
  objectName: onScreenCapture
  # OffScreen
  CameraSelector:
objectName: offScreenCameraSelector
RenderTargetSelector:
  target:
RenderTarget:
  attachments:
  - RenderTargetOutput:
  attachmentPoint: Color0
  texture:
Texture2D:
  width: 512
  height: 512
  format: RGBAFormat
  ClearBuffers:
buffers: ColorDepthBuffer
clearColor: "#EEfaebd7"
NoDraw: {}
  RenderCapture:
objectName: offScreenCapture

Results of the render captures:

   onScreenCapture: https://postimg.cc/image/v26nfj36l/
   offScreenCapture: https://postimg.cc/image/68x3evrvx/

I fixed the offscreen aspect ratio issue by creating a new offscreen camera
and forwarding all but these two signals:

   Qt3DRender::QCamera::aspectRatioChanged
   Qt3DRender::QCamera::projectionMatrixChanged

Question:

   1) I am using an RGBAFormat for my texture. I changed the alpha in the
clear colour from 0x80 to 0xEE and I now see an alpha cleared background in
the offscreen (see image). I can just use RGB for my purposes right now,
but I'm curious why the onscreen clearing is not using the alpha channel? I
can confirm this by changing the clear colour to #FF00 - I just get
solid black.

Problem:

   1) The resulting scene isn't the same in the offscreen capture:
  - the yellow cube is on top of everything
  - the red & blue arrows aren't clipped by the plane
  - it isn't antialiased

I'm wondering if this is because the shaders aren't being used for the
offscreen texture? I noticed in apitrace that when switching
GL_DRAW_FRAMEBUFFER to 0 (onscreen), glUseProgram(1) is called. This is not
called when switching GL_DRAW_FRAMEBUFFER to 1 (offscreen). Is the program
supposed to persist or does it need to be called again when switching
framebuffers?

(apitrace is super-cool. Thanks for the pointer.)

Thank you for your time & help!

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Qt3D Framegraphs

2018-09-04 Thread Andy
On Mon, Sep 3, 2018 at 9:25 AM Paul Lemire  wrote:

> Glad to hear that, hopefully things are starting to make more sense now.
>

Getting there - thank you!

On 09/03/2018 02:54 PM, Andy wrote:
>
> Progress! Here's my current framegraph:
>
> [snip]
>
> Question:
>
>1) I am using an RGBAFormat for my texture. I changed the alpha in the
> clear colour from 0x80 to 0xEE and I now see an alpha cleared background in
> the offscreen (see image). I can just use RGB for my purposes right now,
> but I'm curious why the onscreen clearing is not using the alpha channel? I
> can confirm this by changing the clear colour to #FF00 - I just get
> solid black.
>
> Well I believe that this depends on the format of your back buffer
> (usually it is RGB). You can try to query it with
> QSurfaceFormat::defaultFormat() and looking for the alphaBuffer size (or
> apitrace also gives you the format when you select a draw call that renders
> to screen).
>

Got it! If I setAlphaBufferSize( 8 ) on my default format it works.

>
> Problem:
>
>1) The resulting scene isn't the same in the offscreen capture:
>   - the yellow cube is on top of everything
>   - the red & blue arrows aren't clipped by the plane
>
> I suspect that this is caused by the fact that you have no depth
> attachment on your RenderTarget so that depth testing isn't performed
> properly. You would need to create another RenderTargetOutput that you bind
> to the attachment point Depth with a suitable Texture2D texture with format
> (D32, D24 ...).
>

Bingo. That fixes it.


>   - it isn't antialiased
>
> That's likely caused by a) not having a high resolution enough for your
> attachments b) using a Texture2D instead of a Texture2DMultisample (though
> I'm not sure RenderCapture would work with the latter).
>
Have you tried going for a 2048/2408 texture instead of 512/512 assuming
> you have no memory constraints? Then you can always scale back the QImage
> you capture to 512/512 if need be.
>

Texture2DMultisample does indeed make it better. Once I set "samples" to
the same as my QSurfaceFormat::defaultFormat(), I get decent results. Not
100% the same, but very close. (So it does work w/RenderCapture!)

My "final" frame graph (for those following along):

RenderSurfaceSelector:
  Viewport:
ClearBuffers:
  buffers: ColorDepthBuffer
  clearColor: "#faebd7"
  NoDraw: {}
FrustumCulling:
  # OnScreen
  CameraSelector:
objectName: onScreenCameraSelector
RenderCapture:
  objectName: onScreenCapture
  # OffScreen
  CameraSelector:
objectName: offScreenCameraSelector
RenderTargetSelector:
  target:
RenderTarget:
  attachments:
  - RenderTargetOutput:
  attachmentPoint: Color0
  texture:
Texture2DMultisample:
  objectName: offScreenTexture
  width: 1024
  height: 768
  format: RGBFormat
  samples: 8
  - RenderTargetOutput:
  attachmentPoint: Depth
  texture:
Texture2DMultisample:
  width: 1024
  height: 768
  format: D24
  samples: 8
  ClearBuffers:
buffers: ColorDepthBuffer
clearColor: "#faebd7"
NoDraw: {}
  RenderCapture:
objectName: offScreenCapture


If anyone is interested in the code to read framegraphs as YAML like this,
please get in touch and I can clean it up & put on gitlab (sometime next
month). It makes it a lot easier to iterate on building a framegraph. It
also drastically reduces the amount of boilerplate code, you can include &
read them as resources, and you don't have to bring in all of QML.

Now that I have the basics working... I'll need to dig into the multipass
shader stuff to get the effects I want.

Thank you for your patience!
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Building 5.12 on macOS 10.12.6

2018-09-12 Thread Andy
I'm running into problems building 5.12 (git from yesterday) on macOS
10.12.6:

Undefined symbols for architecture x86_64:
  "_SSLCopyALPNProtocols", referenced from:
  QSslSocketBackendPrivate::continueHandshake() in qsslsocket_mac.o
  "_SSLSetALPNProtocols", referenced from:
  QSslSocketBackendPrivate::initSslContext() in qsslsocket_mac.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make[4]: *** [../../lib/QtNetwork.framework/QtNetwork_debug] Error 1
make[3]: *** [debug-all] Error 2
make[2]: *** [sub-network-make_first] Error 2
make[1]: *** [sub-src-make_first] Error 2
make: *** [module-qtbase-make_first] Error 2


Configuration knows it's using Secure Transport:

  SecureTransport  yes
  OpenSSL  no
Qt directly linked to OpenSSL  no
  OpenSSL 1.1  no


Anyone else having this issue?

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] {macOS} Qt Installer insists on installing 5.11.2 snapshot

2018-09-12 Thread Andy
(Posted in the forum - no response - but thought I'd mention it here as
well to see if others have the same problem.)

macOS 10.12.6

- run maintenance tool (v 3.0.1)
- choose Add or remove components
- deselect all new things (Qt 5.11.2 snapshot)
- deselect an old version of Qt to remove it
- click Continue (it says it's going to use 3.98 GiB of space)
- click Update

It starts installing 5.11.2...

Result: I cannot remove an old version of Qt. (Maybe it would after
installing 5.11.2, but I don't want to install it.)

I wonder if it's a similar problem as
https://forum.qt.io/topic/94409/qt-installation-failed-with-unresolved-dependencies

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Building 5.12 on macOS 10.12.6

2018-09-12 Thread Andy
>From the config output:

  macOS version .. 10.12.6
  Xcode version .. 9.2
  Clang version .. Apple LLVM version 9.0.0
(clang-900.0.39.2)
  macOS SDK version .. 10.13.2
  macOS minimum deployment target  10.12

As far as I know this is the latest "everything" I can install on 10.12.6.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>



On Wed, Sep 12, 2018 at 7:45 PM Thiago Macieira 
wrote:

> On Wednesday, 12 September 2018 10:12:32 PDT Andy wrote:
> > I'm running into problems building 5.12 (git from yesterday) on macOS
> > 10.12.6:
>
> What XCode version are you using and what target SDK is it using? Qt can
> only
> be compiled against the very latest SDK for the Apple OSes.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
>
>
> ___
> 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


Re: [Interest] Building 5.12 on macOS 10.12.6

2018-09-13 Thread Andy
Thanks Tony.

The commit says "Also changes the resolution of the desktop to 1280x800x32,
timezone to GMT..."

Is that a side effect of the changes in the commit or is something missing?
(I've never looked at the coin stuff.)

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>



On Thu, Sep 13, 2018 at 7:46 AM Tony Sarajärvi  wrote:

> We have seen problems there for sure:
>
> https://codereview.qt-project.org/#/c/238051/
>
>
>
> -Tony
>
>
>
> *From:* Interest  *On
> Behalf Of *Andy
> *Sent:* torstai 13. syyskuuta 2018 2.51
> *To:* Thiago Macieira 
> *Cc:* Qt Project 
> *Subject:* Re: [Interest] Building 5.12 on macOS 10.12.6
>
>
>
> From the config output:
>
>
>
>   macOS version .. 10.12.6
>   Xcode version .. 9.2
>   Clang version .. Apple LLVM version 9.0.0
> (clang-900.0.39.2)
>   macOS SDK version .. 10.13.2
>   macOS minimum deployment target  10.12
>
>
>
> As far as I know this is the latest "everything" I can install on 10.12.6.
>
>
>
> ---
> Andy Maloney  //  https://asmaloney.com
>
> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>
>
>
>
>
>
>
> On Wed, Sep 12, 2018 at 7:45 PM Thiago Macieira 
> wrote:
>
> On Wednesday, 12 September 2018 10:12:32 PDT Andy wrote:
> > I'm running into problems building 5.12 (git from yesterday) on macOS
> > 10.12.6:
>
> What XCode version are you using and what target SDK is it using? Qt can
> only
> be compiled against the very latest SDK for the Apple OSes.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
>
>
> ___
> 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


Re: [Interest] How to load 3D scene with QSceneLoader

2018-09-13 Thread Andy
I've never used QSceneLoader, but don't you have to check for a status of
Qt3DRender::QSceneLoader::Ready and then use QSceneLoader::entity() to
access the entity that was read in?

Maybe take a look at tests/manual/assimp-cpp for inspiration?

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>



On Thu, Sep 13, 2018 at 1:25 PM Botond D  wrote:

> Hi,
>
> I've been struggling to load a 3D scene from a Collada (DAE) file. I've
> been experimenting with the following piece of code:
>
> Qt3DCore::QEntity *importScene()
> {
> // Root entity
> Qt3DCore::QEntity *rootEntity = new Qt3DCore::QEntity;
>
> auto importedScene = new Qt3DCore::QEntity(rootEntity);
> auto loader = new Qt3DRender::QSceneLoader;
> loader->setSource(QUrl("/home/botond/Desktop/castle_on_hill.dae"));
> QObject::connect(loader, &Qt3DRender::QSceneLoader::statusChanged, []
> (Qt3DRender::QSceneLoader::Status s) {
> std::cout << "status: " << s << std::endl;
> });
>
> Qt3DCore::QTransform *transform = new Qt3DCore::QTransform;
> transform->setScale3D(QVector3D(1.5, 1, 0.5));
>
> importedScene->addComponent(loader);
> importedScene->addComponent(transform);
>
> return rootEntity;
> }
>
> However nothing is rendered and no status change is detected. What am I
> doing wrong? What is the intended usage of `QSceneLoader`?
>
> Thanks,
> Botond
> ___
> 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


Re: [Interest] {macOS} Qt Installer insists on installing 5.11.2 snapshot

2018-09-14 Thread Andy
No response here either, so bug filed at:

   https://bugreports.qt.io/browse/QTIFW-1188

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>



On Wed, Sep 12, 2018 at 1:50 PM Andy  wrote:

> (Posted in the forum - no response - but thought I'd mention it here as
> well to see if others have the same problem.)
>
> macOS 10.12.6
>
> - run maintenance tool (v 3.0.1)
> - choose Add or remove components
> - deselect all new things (Qt 5.11.2 snapshot)
> - deselect an old version of Qt to remove it
> - click Continue (it says it's going to use 3.98 GiB of space)
> - click Update
>
> It starts installing 5.11.2...
>
> Result: I cannot remove an old version of Qt. (Maybe it would after
> installing 5.11.2, but I don't want to install it.)
>
> I wonder if it's a similar problem as
> https://forum.qt.io/topic/94409/qt-installation-failed-with-unresolved-dependencies
>
> ---
> Andy Maloney  //  https://asmaloney.com
> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] OpenGL: Setting samples on default QSurfaceFormat

2018-09-17 Thread Andy
I seem to have a catch-22.

- QSurfaceFormat::setDefaultFormat() needs to be called before application
construction.

- I want multisampling on a 3.3 context by default, so I need to call
QSurfaceFormat::setSamples().

- I can't know how many samples are supported until after application
construction by actually creating a context and asking how many it
supports. (Or can I somehow?)

- If I just setSamples() to the number I want (8) and call
setDefaultFormat, then any card/driver that doesn't support that many
samples fails to be created and I end up with a 2.0 default context.

Any ideas?

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] OpenGL: Setting samples on default QSurfaceFormat

2018-09-19 Thread Andy
Thanks Sean.

That was my initial thought too, but in order to create the context to
check the results, I need an application. But if I set the default after I
create the application I get a warning:

Warning: Setting a new default format with a different version or profile
after the global shared context is created may cause issues with context
sharing. (qsurfaceformat.cpp:836, static void
QSurfaceFormat::setDefaultFormat(const QSurfaceFormat &))

(Which is what it says in the docs for QSurfaceFormat::setDefaultFormat())

Hence the catch-22.

The problem is actually stranger - if I request with 8 samples:

OpenGL Info
  Vendor: VMware, Inc.
  Renderer: SVGA3D; build: RELEASE;  LLVM;
  Version: 3.0 Mesa 17.2.0 (git-8cfea49610)
  Shading language: 1.30
  Requested: (v3.3 [core], depthBufferSize 24, stencilBufferSize -1, rgba
BufferSizes (-1, -1, -1, -1 ), samples 8, swapBehavior 0, swapInterval 1)
  Current:   (v3.0 [none], depthBufferSize 24, stencilBufferSize 8, rgba
BufferSizes (8, 8, 8, 8 ), samples -1, swapBehavior 2, swapInterval 1)

If I request without setSamples():

OpenGL Info
  Vendor: VMware, Inc.
  Renderer: SVGA3D; build: RELEASE;  LLVM;
  Version: 3.3 (Core Profile) Mesa 17.2.0 (git-8cfea49610)
  Shading language: 3.30
  Requested: (v3.3 [core], depthBufferSize 24, stencilBufferSize -1, rgba
BufferSizes (-1, -1, -1, -1 ), samples -1, swapBehavior 0, swapInterval 1)
  Current:   (v3.3 [core], depthBufferSize 24, stencilBufferSize 8, rgba
BufferSizes (8, 8, 8, 8 ), samples 0, swapBehavior 2, swapInterval 1)


I would have expected the first case to return "0" samples like the second
one - it properly adjusts everything else like the buffer sizes and swap
behaviour.

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>



On Wed, Sep 19, 2018 at 4:28 AM Sean Harmer  wrote:

> Hi Andy,
>
> In your main, set up the desired QSurfaceFormat, use it to try to create a
> context, and check the results. If that works great, destroy it and carry
> on with that as the default surface format. Otherwise, drop down a level
> and try again until you find a surface format that works.
>
> Cheers,
>
> Sean
>
> On 17/09/2018 17:57, Andy wrote:
>
> I seem to have a catch-22.
>
> - QSurfaceFormat::setDefaultFormat() needs to be called before application
> construction.
>
> - I want multisampling on a 3.3 context by default, so I need to call
> QSurfaceFormat::setSamples().
>
> - I can't know how many samples are supported until after application
> construction by actually creating a context and asking how many it
> supports. (Or can I somehow?)
>
> - If I just setSamples() to the number I want (8) and call
> setDefaultFormat, then any card/driver that doesn't support that many
> samples fails to be created and I end up with a 2.0 default context.
>
> Any ideas?
>
> ---
> Andy Maloney  //  https://asmaloney.com
> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>
>
>
> ___
> Interest mailing 
> listInterest@qt-project.orghttp://lists.qt-project.org/mailman/listinfo/interest
>
>
> ___
> 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


Re: [Interest] OpenGL: Setting samples on default QSurfaceFormat

2018-09-19 Thread Andy
No - because deleting an application object never occurred to me :-) I've
always treated it like main() - I guess I assumed you could only
instantiate one.

Any thoughts on the second part about why I get a 3.0 context if I try to
set samples instead of the 3.3 I get when I don't? On macOS if I request 16
samples, and it can only do 8, I get 8.

Thanks Giuseppe!

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>



On Wed, Sep 19, 2018 at 8:49 AM Giuseppe D'Angelo via Interest <
interest@qt-project.org> wrote:

> Il 19/09/2018 14:32, Andy ha scritto:
> >
> > That was my initial thought too, but in order to create the context to
> > check the results, I need an application. But if I set the default after
> > I create the application I get a warning:
> >
> > Warning: Setting a new default format with a different version or
> > profile after the global shared context is created may cause issues with
> > context sharing. (qsurfaceformat.cpp:836, static void
> > QSurfaceFormat::setDefaultFormat(const QSurfaceFormat &))
> >
> >
> > (Which is what it says in the docs for
> QSurfaceFormat::setDefaultFormat())
> >
> > Hence the catch-22.
>
> Are you destroying the QGuiApplication object after an unsuccessful
> test, and recreating it after changing the default format?
>
> 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
>
> ___
> 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


[Interest] lists.qt-project.org down/unreachable

2018-09-21 Thread Andy
lists.qt-project.org has been down/unreachable for a couple of days - not
sure who to contact to let them know...

https://lists.qt-project.org/pipermail/releasing/

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] Building 5.12 on macOS 10.12.6

2018-09-30 Thread Andy
If anyone else was having this problem, it's been fixed by Timur:

  https://bugreports.qt.io/browse/QTBUG-70757
  https://codereview.qt-project.org/#/c/241268/

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>



On Thu, Sep 13, 2018 at 9:22 AM Tony Sarajärvi  wrote:

> Naah. Those are just things I fixed that were wrong in the previous 10.12
> we used. However, provisioining scripts should fix the GMT to the old one
> as well, if only autotests worked with it
>
> Sent from my Huawei Mobile
>
>  Original Message 
> Subject: Re: [Interest] Building 5.12 on macOS 10.12.6
> From: Andy
> To: Tony Sarajärvi
> CC: Thiago Macieira ,Qt Project
>
> Thanks Tony.
>
> The commit says "Also changes the resolution of the desktop to
> 1280x800x32, timezone to GMT..."
>
> Is that a side effect of the changes in the commit or is something
> missing? (I've never looked at the coin stuff.)
>
> ---
> Andy Maloney  //  https://asmaloney.com
> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>
>
>
> On Thu, Sep 13, 2018 at 7:46 AM Tony Sarajärvi 
> wrote:
>
>> We have seen problems there for sure:
>>
>> https://codereview.qt-project.org/#/c/238051/
>>
>>
>>
>> -Tony
>>
>>
>>
>> *From:* Interest  *On
>> Behalf Of *Andy
>> *Sent:* torstai 13. syyskuuta 2018 2.51
>> *To:* Thiago Macieira 
>> *Cc:* Qt Project 
>> *Subject:* Re: [Interest] Building 5.12 on macOS 10.12.6
>>
>>
>>
>> From the config output:
>>
>>
>>
>>   macOS version .. 10.12.6
>>   Xcode version .. 9.2
>>   Clang version ...... Apple LLVM version 9.0.0
>> (clang-900.0.39.2)
>>   macOS SDK version .. 10.13.2
>>   macOS minimum deployment target  10.12
>>
>>
>>
>> As far as I know this is the latest "everything" I can install on 10.12.6.
>>
>>
>>
>> ---
>> Andy Maloney  //  https://asmaloney.com
>>
>> twitter ~ @asmaloney <https://twitter.com/asmaloney>
>>
>>
>>
>>
>>
>>
>>
>> On Wed, Sep 12, 2018 at 7:45 PM Thiago Macieira <
>> thiago.macie...@intel.com> wrote:
>>
>> On Wednesday, 12 September 2018 10:12:32 PDT Andy wrote:
>> > I'm running into problems building 5.12 (git from yesterday) on macOS
>> > 10.12.6:
>>
>> What XCode version are you using and what target SDK is it using? Qt can
>> only
>> be compiled against the very latest SDK for the Apple OSes.
>>
>> --
>> Thiago Macieira - thiago.macieira (AT) intel.com
>>   Software Architect - Intel Open Source Technology Center
>>
>>
>>
>> ___
>> 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


Re: [Interest] Qt Install Framework - Becoming a Microsoft Known Publisher

2018-10-09 Thread Andy
While we're on the subject...

I've been trying to find out if one can use the Apple dev cert to sign
Windows desktop apps as well - does anyone know if this is possible? Two
birds/one stone?

Thanks!

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>



On Tue, Oct 9, 2018 at 12:17 PM Vadim Peretokin 
wrote:

> Here's how we do code signing in CI with Mudlet for our Qt project:
> https://github.com/Mudlet/Mudlet/blob/development/CI/appveyor.after_success.ps1
>
> Note that we use Squirrel, not the Qt Install Framework - Squirrel is much
> more user-friendly.
>
> - Vadim.
>
> On Tue, Oct 9, 2018 at 6:04 PM Nuno Santos 
> wrote:
>
>> Nils,
>>
>> This is good stuff! Thanks for sharing.
>>
>> This will definitely help with the CI process.
>>
>> Best,
>>
>> Nuno
>>
>> > On 9 Oct 2018, at 16:58, Nils Jeisecke 
>> wrote:
>> >
>> > Am 09.10.2018 um 16:29 hat Nuno Santos geschrieben:
>> >> There are several providers for this. Globalsign is just one. Then you
>> will receive a usb dongle with your certificate (GlobalSign sends a USB
>> dongle).
>> > Yeah, and the glorious signtool will ask for a PIN every time your
>> > automated build signs the executable...
>> >
>> > Not Qt related at all but just in case someone is interested - This is
>> > an alternative signing client implementation that allows the PIN to be
>> > specified on the command line (there are probably more secure ways, but
>> > you need that super secure USB token anyway...):
>> >
>> > https://pastebin.com/6iYNKLpN
>> >
>> > See the stackoverflow link for pointers on how to export the
>> > certificate.
>> >
>> > Nils
>> >
>>
>> ___
>> 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
>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] Qt 5.12 Official packages for MinGW 64 bit?

2018-10-15 Thread Andy
In coin/platform_configs/qt5.txt:

qtci-windows-10-x86_64-10
Mingw73 Packaging DebugAndRelease Release OpenGLDynamic
DisableTests

I don't know how the coin stuff works, but does this mean that there will
be official MinGW 64 bit packages for 5.12?

If so, will WebEngine be included?

---
Andy Maloney  //  https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


  1   2   3   >