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

In Ubuntu unity tray icon geometry returns QRect(0,0 0x0), works fine in windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Out of scope
    • Affects Version/s: 4.8.0
    • Fix Version/s: None
    • Component/s: GUI: Window management
    • Labels:
      None
    • Environment:
      Ubuntu 12.04, Unity

      Description

      I need to get the tray icon geometry so I can put a dialog window near it. Using Qt 4.8.0 in windows 7 the problem doesn't occur and the geometry is as expected but in a new Ubuntu 12.04 the geometry returns QRect(0,0 0x0) and the dialog windows appears in the corner of the screen.

      The code to move the dialog window:

      void IDialog::moveToSystrayArea(const QSystemTrayIcon * trayIcon)
      {
      qDebug() << trayIcon->geometry();
      if (trayIcon)
      move(trayIcon->geometry().left() - geometry().width()/2,
      trayIcon->geometry().top() - geometry().height());
      }

      Obs: works fine in windows 7 (32,64 bits)

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              humbhenri Humberto Pinheiro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes