Window appears as a popup window and not as main window..
Hi,
I've created an application and on Qt simulator it opens as a main window, but on the n900 it opens as popup window... How do I make it appear as a fixed window with the X (close) option?
MainDialog is the class with the form that I've created, here is my code:
Code:
main.cpp
int main(int argc, char *argv[]) {
MainWindow * mw = new MainWindow(NULL);
return app->exec();
}
mainwindow.h
class mainDialog;
class MainWindow : public MainWindowInterface
{
Q_OBJECT
public:
...
private:
mainDialog *m_dialog;
...
};
mainwindow.cpp
MainWindow
::MainWindow(QWidget *_parent
) : _studentName(""),
_studentHostname(""),
_teacherName(""),
_className(""),
_lastStudentName(""),
_lastStudentHostname(""),
_lastTeacherName(""),
_lastClassName(""),
_teacherHostname("")
{
iNetworkInfoLoaded = false;
iBasicStudentLoaded = false;
iSFTLoaded = false;
iSQLoaded = false;
iSCLoaded = false;
mainDialog maindlg ( _parent, this );
maindlg.setWindowTitle( tr( "My app" ) );
maindlg.
setWindowIcon(QPixmap( ":/resources/logo.png" ));
m_dialog = &maindlg;
loadPlugins();
maindlg.exec();
}
maindialog.h
namespace Ui {
class mainDialog;
}
class MainWindow;
{
Q_OBJECT
public:
explicit mainDialog
( QWidget * _parent, MainWindow
* _parentMW
);
virtual ~mainDialog();
public slots:
void aboutPlugins( void );
void setEnableButton
( QString button,
bool option
);
private:
MainWindow * mw;
Ui::mainDialog *ui;
};
maindialog.cpp
mainDialog
::mainDialog(QWidget * _parent, MainWindow
* _parentMW
) : mw(_parentMW),
ui(new Ui::mainDialog)
{
ui->setupUi(this);
...
}
Re: Window appears as a popup window and not as main window..
anyone? please this is urgent... I can't get it to work... tried making the mainwindow a main window and got errors with some plugins classes... :confused:
Re: Window appears as a popup window and not as main window..
hi,
try with windowflags
Bala