Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-2681

Qt 4.4.1: menu lists are drawn behind top-level-widgets on MacOS for remote X-apps

    XMLWordPrintable

Details

    • macOS

    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();
      }

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bhughes Bradley T. Hughes (closed Nokia Identity) (Inactive)
            dettman Dean Dettman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes