Results 1 to 6 of 6

Thread: Problems when adding serialport module in Qt project

  1. #1
    Join Date
    Feb 2016
    Location
    S. Stefano di Sessanio
    Posts
    11
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Problems when adding serialport module in Qt project

    Hi,
    I need to use QSerialport in my Qt project. Following the official documentation, I added
    Qt Code:
    1. QT += serialport
    To copy to clipboard, switch view to plain text mode 
    to my .pro file. After doing this, the build always fails, giving the error: "Unknown module(s) in QT: serialport". I am using Qt Creator 4.1.0 based on Qt 5.6.1. What am I missing?
    Thank you.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Problems when adding serialport module in Qt project

    try installing qt5-qtserialport-devel with your favorite package manager (I assume you are on linux based on your profile information)
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Feb 2016
    Location
    S. Stefano di Sessanio
    Posts
    11
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Problems when adding serialport module in Qt project

    Hi high_flyer,
    my develop PC runs Ubuntu 16.04. Is it possible I cannot find the package you suggested?
    How can I make sure which Qt version am I using in my project?
    Thank you.

  4. #4
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    503
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Problems when adding serialport module in Qt project

    Hi, according to packages.ubuntu.com the package is called libqt5serialport5 and libqt5serialport5-dev.

    Ginsengelf

  5. #5
    Join Date
    Feb 2016
    Location
    S. Stefano di Sessanio
    Posts
    11
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Problems when adding serialport module in Qt project

    Since I need to cross-compile for my device running linux Yocto, is there a different way to include the serial port module in my Qt project? Are the drivers/libraries different?
    Thanks.

  6. #6
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Problems when adding serialport module in Qt project

    I don't understand.
    Yocto is not a distro - its a packaging tool, a distro maker if you will.

    If you are cross compiling you will need a cross compiled version of Qt as well.
    The serial port module is available on all Qt supported platform *I think* - but the docs can probably help.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Project ERROR: Unknown module(s) in QT: webenginewidgets
    By mandlakoteswar2011 in forum Qt Programming
    Replies: 4
    Last Post: 5th April 2018, 09:09
  2. Project ERROR: Unknow module(s) in QT: quick
    By Danilo in forum Qt Quick
    Replies: 6
    Last Post: 11th October 2014, 12:45
  3. error: Unknown module(s) in QT: serialport
    By aguleo in forum Newbie
    Replies: 4
    Last Post: 11th March 2013, 22:54
  4. Replies: 11
    Last Post: 25th April 2012, 13:24
  5. Replies: 0
    Last Post: 26th April 2009, 18:55

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.