-1

I want to open a new window aligned with the try icon (as the built-in volume control does)! :/

I found something about QRect QSystemTrayIcon::geometry()

But idk how to use it

  • 1
    Well, if you check the QRect-documentation, you will see that it gives you x/y coordinates (on the screen) and a width and height parameter. – Felix Nov 20 '15 at 22:46

1 Answers1

0

I would recommend using Qt::Popup flags on your widget.

https://forum.qt.io/topic/6632/use-of-popup-window

QWidget* popupWidget = new QWidget();
popupWidget->setWindowFlags(Qt::Popup);

Pretty much anything else has a lot of corner cases that are hard to cover, like if your window is too tall, goes off the edge of the screen, etc.

Hope that helps.

phyatt
  • 18,472
  • 5
  • 61
  • 80