Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) Qt CreatorWindowsVirtualBoxUbuntu Qt Creator differences between Run and Debug modes

 

Qt FAQ.

 

There are the following differences between Run and Debug mode:

 

(*) This is checked by the program below.

 

 

 

 

 

Technical facts

 

Application type(s)

Operating system(s) or programming environment(s)

IDE(s):

Project type:

C++ standard:

Compiler(s):

Libraries used:

 

 

 

 

 

Qt project file: CppQtCreatorDifferences.pro

 

#-------------------------------------------------
#
# Project created by QtCreator 2011-02-09T11:50:27
#
#-------------------------------------------------
QT       += core gui
TARGET = CppQtCreatorDifferences
CONFIG   += console
CONFIG   -= app_bundle
TEMPLATE = app
SOURCES += main.cpp \
    dialog.cpp
HEADERS += \
    dialog.h
FORMS += \
    dialog.ui
unix:!symbian {
    maemo5 {
        target.path = /opt/usr/bin
    } else {
        target.path = /usr/local/bin
    }
    INSTALLS += target
}

 

 

 

 

 

dialog.cpp

 

#include "dialog.h"
#include "ui_dialog.h"

Dialog::Dialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Dialog)
{
    ui->setupUi(this);
}

Dialog::~Dialog()
{
    delete ui;
}

void Dialog::setText(const char* c)
{
  ui->label->setText(c);
}

 

 

 

 

 

dialog.h

 

#ifndef DIALOG_H
#define DIALOG_H

#include <QDialog>

namespace Ui {
    class Dialog;
}

class Dialog : public QDialog
{
    Q_OBJECT

public:
    explicit Dialog(QWidget *parent = 0);
    ~Dialog();
    void setText(const char* );

private:
    Ui::Dialog *ui;
};
#endif // DIALOG_H

 

 

 

 

 

main.cpp

 

#include <QApplication>
#include "dialog.h"

int main(int argc, char *argv[])
{
  QApplication a(argc, argv);
  Dialog d;
  d.setText(argv[0]);
  d.show();
  return a.exec();
}

 

 

 

 

 

Downloads

 

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict