I followed the example found in this thread and compared it with every other example of ENCs in ArcGIS I could find, which wasn't very many, but my widget doesn't ever display the charts. At this point I've simplified it down to exactly the code from that example with one exception, which is that I'm not displaying it in the centralWidget. It's one of two display widgets on the main window, the other being a QOpenGLWidget. I have the S-57 format ENCs in the right place, I have the hydrography folder from the site, a SENC file gets generated and I get the output line that says "Loaded all maps". I suspect there's another setup step along the way I'm not aware of. Is there any reason that code wouldn't work for a QWidget promoted to my class on the main window?
Solved! Go to Solution.
This should work. I modified a BuildLegend sample that uses multiple widgets to display the ENC Layer in one of them, and it works there.
As for the Visual Studio vs Qt Creator concern, we design our samples to use qmake and Qt Creator. However, we have customers using our API with cmake and Visual Studio as well. It's just that we set things up out of the box to work with qmake and Qt Creator - if you wish to use another workflow, you have that option and everything should work.
Thanks for your reply. That example works, but it's not what I'm looking for. That code, like the sample code I used, assumes you want your chart to be the central widget on the main window. I need it to exist in a smaller widget alongside other things on the central widget. I think that's the part I'm having trouble with. Another concern I have is that all these samples are built in Qt Creator and our project is in Visual Studio, so there may be some generated code that I'm not getting. For example I see a .pri file that isn't explained anywhere.
This should work. I modified a BuildLegend sample that uses multiple widgets to display the ENC Layer in one of them, and it works there.
As for the Visual Studio vs Qt Creator concern, we design our samples to use qmake and Qt Creator. However, we have customers using our API with cmake and Visual Studio as well. It's just that we set things up out of the box to work with qmake and Qt Creator - if you wish to use another workflow, you have that option and everything should work.
Also not exactly what I needed, but your examples did clue me in to a couple of things I had missed. In the end I got it to work the way I wanted. Thanks a lot for your help!
I want this in QT Quick QML