[Qt4-preview-feedback] Issue with showMaximised()
Julien Hinard
julien.hinard at gmail.com
Fri Feb 6 15:26:28 CET 2009
Hello,
The following code doesn't if it is built with Qt 4.5.0-rc1:
#include "mainwindow.h"
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
showMaximized();
QToolBar *tool_bar = new QToolBar(this);
addToolBar(tool_bar);
QAction *action = new QAction("Action", this);
tool_bar->addAction(action);
}
The soft will be built and will run without any problem, but the ToolBar
won't be displayed.
The problem comes from showMaximized(), that's because it is placed before
the ToolBar declaration.
The following code works well:
#include "mainwindow.h"
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
{
QToolBar *tool_bar = new QToolBar(this);
addToolBar(tool_bar);
QAction *action = new QAction("Action", this);
tool_bar->addAction(action);
showMaximized();
}
With Qt 4.4.3, both codes are working well
Is it due to a bug in Qt 4.5.0?
Thanks,
Regards,
Julien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt4-feedback/attachments/20090206/ecde62e3/attachment.html
More information about the Qt4-feedback
mailing list