giusepped
23rd July 2011, 15:42
Maybe today I must have something in my head very odd, because I cannot see why this simple program does not work.
The problem is that I cannot change at all the MainWindow's title, neither add some Menu,toolbar....
For example, in the code below, the word "OmniVision" doesnot appear in the MainWindow top bar, it just writes "MainWindow".
MainWindow::MainWindow( )
{
this->setWindowTitle(tr("OminiVision "));
}
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
class MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow( );
and the main.cpp is
#include <QtGui/QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
a.setApplicationName("OmniVision Japita SE");
w.show();
return a.exec();
}
Simpler than this...
I noted that if I put in the .pro "CONFIG = release", the problem is ther.
BUT: if I put "CONFIG = debug_and_release" everything is working (title, button, menu,and so on).
Why I have to use also debug?
The problem is that I cannot change at all the MainWindow's title, neither add some Menu,toolbar....
For example, in the code below, the word "OmniVision" doesnot appear in the MainWindow top bar, it just writes "MainWindow".
MainWindow::MainWindow( )
{
this->setWindowTitle(tr("OminiVision "));
}
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
class MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow( );
and the main.cpp is
#include <QtGui/QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
a.setApplicationName("OmniVision Japita SE");
w.show();
return a.exec();
}
Simpler than this...
I noted that if I put in the .pro "CONFIG = release", the problem is ther.
BUT: if I put "CONFIG = debug_and_release" everything is working (title, button, menu,and so on).
Why I have to use also debug?