pvbrowser / pvb

HMI and SCADA
http://pvbrowser.org
Other
268 stars 152 forks source link

using QT inside pvb app #10

Open gentooza opened 7 years ago

gentooza commented 7 years ago

Hi!

Is it possible to use QT inside a pvb app? I mean, one disadvantage of QT is the need of calling QT app and gui for using elements as QPaint. But I have no idea with the pvserver structure how to get it.

Has anyone tried this?

Thanks!

pvbrowser commented 7 years ago

Am 12.07.2017 um 10:38 schrieb Joa:

Is it possible to use QT inside a pvb app?

I mean, one disadvantage of QT is the need of calling QT app and gui for using elements as QPaint. But I have no idea with the pvserver structure how to get it.

The trick is that a pvserver does not need any Qt at all. Only the pvbrowser client on the client computer uses Qt. The pvserver simply instructs the client to call Qt methods on Qt Widgets.

Thus a pvserver might run on embedded systems without any GUI libraries.

gentooza commented 7 years ago

yeah, I get the point

The problem I've met is I need to use QT for image handling (cause of a library dependency) :-/ I guess I'll should try to move to another library.

And it is, pvserver is a terminal application so no QT.

cheers!

pvbrowser commented 7 years ago

The problem I've met is I need to use QT for image handling (cause of a library dependency) :-/ I guess I'll should try to move to another library. Portable image handling with small footprint: http://libpng.org/pub/png/libpng.html http://libjpeg.sourceforge.net/

pvbrowser commented 7 years ago

The problem I've met is I need to use QT for image handling (cause of a library dependency) :-/ I guess I'll should try to move to another library. But wait, of course you can use Qt within a pvserver, because it is a normal C++ application. Simply add Qt to the project file.

But the footprint will be bigger that using libjpg or libpng. And you can only use Qt calls that do not draw on the screen (only manipulate image).

gentooza commented 7 years ago

Yeah, the problem is although I don't want to draw anything in the screen, there are classes that need a gui running for being used, as QPainter.

It has no sense for me, as I want only use it for drawing text in a png QPixmap object, but I think I'll parse the png editing using imagemagick or libpng and afterwards load it using Qpixmap or Qimage. I'll continue studying it. here is a link to qt forum talking about it, https://forum.qt.io/topic/2002/linux-non-gui-application-drawimage-crash

Thank you anyway!

pvbrowser commented 7 years ago

Am 12.07.2017 um 11:20 schrieb Joa:

Yeah, the problem is although I don't want to draw anything in the screen, there are classes that need a gui running for being used, as QPainter.

It has no sense for me, as I want only use it for drawing text in a png QPixmap object, but I think I'll parse the png editing using imagemagick or libpng and afterwards load it using Qpixmap or Qimage. I'll continue studying it. here is a link to qt forum talking about it, https://forum.qt.io/topic/2002/linux-non-gui-application-drawimage-crash

Thank you anyway!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pvbrowser/pvb/issues/10#issuecomment-314705690, or mute the thread https://github.com/notifications/unsubscribe-auth/AA4GgtSDWQTqW1KYeGCB7lBOquPShM2Pks5sNI_JgaJpZM4OVTXY.

Hint: use this for drawing at server side

https://www.cairographics.org/