Search code examples
c++qtubuntuwebsocketqt6

How to install websockets for Qt 6?


Already referred below old posts, but its solution of installing websockets didn't work in my Ubuntu 21.10.

This could be probably due to my Qt is 6.2, while the available library is from Qt5, viz. libqt5websockets5-dev.

How to install websocket module properly for the Qt6, to fix below error?

Project ERROR: Unknown module(s) in QT: websockets


Solution

  • When installing Qt via Qt Maintenance Tool, just go to Additional Libraries and check QtWebSockets. It is available in Qt 6.2.x versions.

    enter image description here