Eventhough,我把 '網絡' 在pro文件,Qt Creator中無法找到,QTcpServer既可並與QTcpSocket
我的Qt Creator中無法找到和與QTcpSocket QTcpServer既可。
我該怎麼辦?
我刪除了Qtcreator並redownloaded已經但它也沒有工作。
我的Linux版本的Ubuntu是14.04 LTS
和我下載Qt Creator的由Linux命令。
命令和apt-get安裝qtcreator
我連做Linus的更新,因爲我擔心自己錯過了什麼。
sudo的獲得,易於更新 須藤GET-APT升級
爲什麼Qtcreator無法感知QTcpServer既可和頭與QTcpSocket?
-------------- *。pro ----------------------------- ------
QT += core gui network
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = server11
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
------------------- mainwindow.h ------------ --------------------------
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QTcpSocket>
#include <QTcpServer>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
你嘗試的#include? Meybe你需要安裝完整的Qt,而不僅僅是QtCreator? –
Yaroslav
但它究竟意味着什麼完整的Qt? – Ray
哇!正在工作!真的很感謝你!我花了大約3小時來解決這個問題。謝謝!! –
Ray