maplibre / maplibre-native-qt

MapLibre Native Qt Bindings and Qt Location Plugin
https://maplibre.org/maplibre-native-qt/docs/
43 stars 16 forks source link

Windows: QMake based project under QtCreator #160

Closed petricf closed 1 month ago

petricf commented 3 months ago

Describe the bug Simple project runs under Linux but fails under Windows.

To Reproduce Steps to reproduce the behavior:

  1. Compile project under Windows
  2. Start it inside QtCreator (under cmdline there is not output)
  3. Aborted

Expected behavior Working as it runs with the same code under Linux w/o any errors/warnings

Screenshots App output:

11:03:36: Starte C:\Projects\mapwidget-test-Desktop_Qt_6_2_2_MSVC2019_64bit-Debug\debug\mapwidget-test.exe... QCoreApplication::applicationDirPath: Please instantiate the QApplication object first QWidget: Must construct a QApplication before a QWidget 11:03:39: C:\Projects\mapwidget-test-Desktop_Qt_6_2_2_MSVC2019_64bit-Debug\debug\mapwidget-test.exe ist abgestürzt.

Message when running in debugger: grafik

Traceback when running in debugger: grafik

Platform information (please complete the following information):

Additional context This is my first opengl project. It may be that i miss something.

The message "... Please instantiate the QApplication object first ..." from the app output above is only displayed under Windows - not under Linux.

The windows environment is running under Proxmox (qemu vm system).

Here the project: demo-map.zip

The *.pro file may have to be changed. This includes the LIBS and INCLUDEPATH variables which point to the QMapLibre installation.

ntadej commented 2 months ago

Does qemu have OpenGL acceleration? Do other Qt example apps work fine?

petricf commented 1 month ago

Using Proxmox (https://pve.proxmox.com) here which uses qemu as VM server.

Linux VM (here: Linux Mint) supports OpenGL. Windows 10 VM requires installation of "OpenCL, OpenGL and Vulcan Compatibility Pack" to support OpenGL 3.

Fixes from #173 solved the problem.