Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.4.1
-
None
Description
When Exporting the X11 Display from a linux box to a Mac X11 terminal, the popup list that is displayed by a QComboBox does not display on top of the main qwidget if the QWidget is a Qt::Tool type.
It seems that the menu-behind problem occurs only if the window on which the menu is invoked happens to be of type Qt::Tool, if I change that to Qt::Window, menus work as expected.
This issue has been reproduced on both Tiger and Leopard.
The following test app can be used to reproduce the issue :
#include <QtGui>
class MyWidget: public QWidget
{
Q_OBJECT
public:
MyWidget(QWidget *parent = 0);
private slots:
void doSomething();
private:
QHBoxLayout *layout;
QPushButton *button;
QComboBox *serverCombo;
};
MyWidget::MyWidget(QWidget *parent) : QWidget(parent,Qt::Tool)
{
setWindowTitle("Support Tester");
layout = new QHBoxLayout;
button = new QPushButton ("Do Something");
layout->addWidget(button);
serverCombo = new QComboBox;
serverCombo->addItem(tr("Trolltech (Australia)"));
serverCombo->addItem(tr("Trolltech (Norway)"));
serverCombo->addItem(tr("Trolltech (People's Republic of China)"));
serverCombo->addItem(tr("Trolltech (USA)"));
layout->addWidget(serverCombo);
setLayout(layout);
QObject::connect(button, SIGNAL(clicked()),
this, SLOT(doSomething()));
}
void MyWidget::doSomething()
{
//TEST CODE HERE
qDebug("something clicked");
}
#include "main.moc"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
MyWidget *myWin = new MyWidget();
myWin->show();
return app.exec();
}