L
L
Loligan2015-05-06 12:46:10
Qt
Loligan, 2015-05-06 12:46:10

How to fix error when connecting QObject and QStringList?

.pro file

TEMPLATE = app
CONFIG += console
CONFIG -= qt
QT += gui
QT += testlib
SOURCES += main.cpp \
user.cpp \
message.cpp \
function.cpp \
human.cpp \
test_class.cpp
HEADERS += \
user .h\
message.h\
function.h\
human.h\
test_class.h

.h file
#ifndef TEST_CLASS_H
#define TEST_CLASS_H
#include
#include
class test_class
{
public:
test_class();
};
#endif // TEST_CLASS_H

errors:
C:\Users\sinister\class_for_social-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK_________\..\class_for_social\test_class.h:4: error: QObject: No such file or directory
C:\Users\sinister\class_for_social-build-desktop- Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK_________\..\class_for_social\test_class.h:5: error: QStringList: No such file or directory

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Martyanov, 2015-05-06
@vilgeforce

Try including the appropriate files.

V
Vladislav Tankov, 2015-05-25
@TanVD

CONFIG -= qt remove from .pro file, add #include .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question