Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Text edit.
Source Link
TomazicM
  • 27k
  • 24
  • 31
  • 42

I am working with C++, QT 5.11.3, Visual Studio 2015 and QGIS 3.7

I'm trying to develop QT c++ application that uses the qgis api. I want to display simple raster and vector map in my qt application. I create QgsVectorLayer and QgsRasterLayer that added to the QgsProject instance and then QgsMapCanvas object. That is no problem so far.

But when i turn the visible property of QgsMapCanvas object, the application crash. The error message and the crash window is above.

QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread ... Reciever (of type 'QGSMapCanvas') ...

enter image description here

I try to this process at different qt thread or main thread no matter what, does not help.
What can i do wrong? Sorry for my english.

I am working with C++, QT 5.11.3, Visual Studio 2015 and QGIS 3.7

I'm trying to develop QT c++ application that uses the qgis api. I want to display simple raster and vector map in my qt application. I create QgsVectorLayer and QgsRasterLayer that added to the QgsProject instance and then QgsMapCanvas object. That is no problem so far.

But when i turn the visible property of QgsMapCanvas object, the application crash. The error message and the crash window is above.

QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread ... Reciever (of type 'QGSMapCanvas') ...

enter image description here

I try to this process at different qt thread or main thread no matter what, does not help.
What can i do wrong? Sorry for my english.

I am working with C++, QT 5.11.3, Visual Studio 2015 and QGIS 3.7

I'm trying to develop QT c++ application that uses the qgis api. I want to display simple raster and vector map in my qt application. I create QgsVectorLayer and QgsRasterLayer that added to the QgsProject instance and then QgsMapCanvas object. That is no problem so far.

But when i turn the visible property of QgsMapCanvas object, the application crash. The error message and the crash window is above.

QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread ... Reciever (of type 'QGSMapCanvas') ...

enter image description here

I try to this process at different qt thread or main thread no matter what, does not help.
What can i do wrong?

edited body
Source Link

I am working with C++, QT 5.11.3, Visual Studio 2015 and QGIS 3.7

I'm trying to develop QT c++ application that uses the qgis api. I want to display simple raster and vector map in my qt application. I create QgsVectorLayer and QgsRasterLayer that added to the QgsProject instance and then QgsMapCanvas object. That is no problem so far.

But when i turn the visible property of QgsMapCanvas object, the application crash. The error message and the crash window is above.

QCoreApplication::sendEvent: "Cannot snedsend events to objects owned by a different thread. Current thread ... Reciever (of type 'QGSMapCanvas') ...

enter image description here

I try to this process at different qt thread or main thread no matter what, does not help.
What can i do wrong? Sorry for my english.

I am working with C++, QT 5.11.3, Visual Studio 2015 and QGIS 3.7

I'm trying to develop QT c++ application that uses the qgis api. I want to display simple raster and vector map in my qt application. I create QgsVectorLayer and QgsRasterLayer that added to the QgsProject instance and then QgsMapCanvas object. That is no problem so far.

But when i turn the visible property of QgsMapCanvas object, the application crash. The error message and the crash window is above.

QCoreApplication::sendEvent: "Cannot sned events to objects owned by a different thread. Current thread ... Reciever (of type 'QGSMapCanvas') ...

enter image description here

I try to this process at different qt thread or main thread no matter what, does not help.
What can i do wrong? Sorry for my english.

I am working with C++, QT 5.11.3, Visual Studio 2015 and QGIS 3.7

I'm trying to develop QT c++ application that uses the qgis api. I want to display simple raster and vector map in my qt application. I create QgsVectorLayer and QgsRasterLayer that added to the QgsProject instance and then QgsMapCanvas object. That is no problem so far.

But when i turn the visible property of QgsMapCanvas object, the application crash. The error message and the crash window is above.

QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread ... Reciever (of type 'QGSMapCanvas') ...

enter image description here

I try to this process at different qt thread or main thread no matter what, does not help.
What can i do wrong? Sorry for my english.

Source Link

QGIS - How to render QgsMapCanvas on QApplication's main window

I am working with C++, QT 5.11.3, Visual Studio 2015 and QGIS 3.7

I'm trying to develop QT c++ application that uses the qgis api. I want to display simple raster and vector map in my qt application. I create QgsVectorLayer and QgsRasterLayer that added to the QgsProject instance and then QgsMapCanvas object. That is no problem so far.

But when i turn the visible property of QgsMapCanvas object, the application crash. The error message and the crash window is above.

QCoreApplication::sendEvent: "Cannot sned events to objects owned by a different thread. Current thread ... Reciever (of type 'QGSMapCanvas') ...

enter image description here

I try to this process at different qt thread or main thread no matter what, does not help.
What can i do wrong? Sorry for my english.