2013-06-20 27 views
3

我使用這個tutorial:http://doc-snapshot.qt-project.org/qt5-stable/qtserialport/blockingmaster.html。但是當我想運行它qt創建者錯誤是:error: Unknown module(s) in QT: serialport當我把鼠標放在#include它寫道:include <QtSerialPort/QSerialPort> no such file or directory。我使用qt 5.0.1任何想法?QtSerialPort QSerialPort沒有這樣的文件或目錄

+1

你真的建立和安裝模塊嗎?閱讀[this](http://qt-project.org/wiki/QtSerialPort)。 – thuga

回答

1

QtSerialPort模塊不是Qt 5.0的一部分。它被添加到即將發佈的Qt 5.1中。

您正在查看即將發佈的Qt 5.1的文檔快照。見http://doc-snapshot.qt-project.org/qt5-stable/qtdoc/index.html

Qt 5.0的文檔在這裏:http://qt-project.org/doc/qt-5.0/qtdoc/index.html

如果你仍然想嘗試QtSerialPort,Qt 5.1的RC1剛剛發佈。你可以在這裏下載:http://download.qt-project.org/development_releases/qt/5.1/5.1.0-rc1/

+0

我已經安裝了QT 5.1.1,但我仍然沒有看到該模塊。它在QT 5.1.1中被刪除了嗎? – CodePoet

+0

我不確定你的意思是「沒有看到它」。 Qt串口模塊是一個附加模塊。您需要在您的qmake項目文件中激活它,並且還包含頭文件QtSerialPort。有關更多信息,請參見[documentation](http://qt-project.org/doc/qt-5.1/qtserialport/qtserialport-index.html)。 – cloose

+1

我的意思是(例如)... \ 5.1.1 \ msvc2012 \ include \ QtSerialPort在安裝QT 5.1.1後不在我的文件系統中。我已經重新安裝並選擇了安裝源組件(默認情況下未選中),並且QtSerialPort現在可用。 – CodePoet

相關問題