开发者

Qt serial port library

I want to make an app using Qt that communicates with serial port.

The problem is that I cant find a library that works and does this thing. I need a non General Public License library I think.

Actually I am not sure cause I don't know if I can use a General Publi开发者_Go百科c License library for a closed source program.

I found qextserialport but I am unable to build it using Qt 4.7.3. I added all the needed headers but it fails on some functions.

Can anyone help me here?


If you want to go closed source and distribute your application, you can't use GPL. You can use LGPL when linking either dynamically or statically. For the latter, you need to provide object files for all of your code, so that they can be statically re-linked with Qt.

Conercerning your base issue, Qt 5 includes a serial port module. On Qt 4, you'll need a platform-specific solution. Reducing the scope might help to point you to something. I suggest that if you don't target portability, you should add relevant tags and comments. Otherwise, saying that you need a portable solution is a good thing too.

As far as I know, on most paltforms, accessing to serial port requires higher privileges, so be ready for that in your deployment.

Concerning qtextserialport, license is BSD so it would work for your clsoed source application. If you post a compilation issue on where it fails, maybe people will be able to help you

I tried to compile it using VC2010 and Qt 4.7.2 and head of project (I just cloned it) compiles flawlessly: I got a nice qextserialport1.dll (that I admit I didn't try using).


There is a QtSerialPort add-on nowadays that can be used for such tasks. I am one of the maintainers behind it. That is the "official" Qt add-on nowadays, so I would suggest switching to it. It will also support Qt 4.

It is properly useful for commercial code (closed source) as I have also been doing that. If we do not yet have an exception for static linking, I would even accept that if legally possible.

My opinion about licenses is somewhere in-between LGPLv2 and MIT, i.e. LGPLv2 + static linking.

Here you can find my blog post about it. It also works fine with Qt 4 as we have had put some effort into that support, too.

http://lpapp.blogspot.co.uk/2013/02/qtserialport-in-qt-51.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜