Commit ec91d3cb authored by Robert Loehning's avatar Robert Loehning Committed by hjk

debugger: Added project for testing CLI I/O

Change-Id: I0240ec0a258ad52a3b65ae320a8630a9711538cc
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent ad6648cc
# for testing with terminal
QT += core
QT -= gui
CONFIG += console
CONFIG -= app_bundle
# for testing without terminal
#QT += core gui
TARGET = cli-io
TEMPLATE = app
SOURCES += main.cpp
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#include <QCoreApplication>
#include <QDebug>
#include <iostream>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
qDebug() << "This is QDebug";
std::cout << "This is stdout" << std::endl;
std::cerr << "This is stderr" << std::endl;
return 0; // Comment out for testing stdin
std::string s;
std::cout << "Enter something: ";
std::cin >> s;
std::cout << "You entered: " << s << std::endl;
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment