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 "));
}
MainWindow::MainWindow( )
{
this->setWindowTitle(tr("OminiVision "));
}
To copy to clipboard, switch view to plain text mode
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
Q_OBJECT
public:
MainWindow( );
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
class MainWindow : public QMainWindow {
Q_OBJECT
public:
MainWindow( );
To copy to clipboard, switch view to plain text mode
and the main.cpp is
#include <QtGui/QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
MainWindow w;
a.setApplicationName("OmniVision Japita SE");
w.show();
return a.exec();
}
#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();
}
To copy to clipboard, switch view to plain text mode
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?
Bookmarks