You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I'm back again with another issue and this time I really am not sure if this is an issue on my behalf or not.
When using a regular QMainWindow, connecting a QAction to a QDialog's open() slot works fine. The dialog's parent is the QMainWindow and it opens in the center, even after moving.
// Example code
AboutWindow *aboutWindow = new AboutWindow(this); // inherits QDialogconnect(helpAction, &QAction::triggered, aboutWindow, &AboutWindow::show);
Initial position
Position after being moved by cursor
However, if I connect that same QAction to the same show() slot, but this time have a QGoodWindow as its parent, this happens:
Initial position
Position after being moved by cursor
If I use move() on the dialog's parent window before it being shown, that is used as the initial position instead.
The text was updated successfully, but these errors were encountered:
I'm aware of the fact that I can get the position of the window on the screen, calculate things from there and position the dialog that way, but I still feel like this is notable.
@kresimirko: I don't think that this is exactly a bug, because the library works, but not mimic the QMainWindow behavior.
As a workaround, you could, instead of create a global QDialog and show and close it as user request, create a temporary QDialog every time the dialog is requested, this also ensure that your dialog will have a Windows show animation on any show event, and not remember it's old position on show event.
Anyway, I will accept your issue as a enhancement to be released in the next version, it will mimic the QMainWindow behavior.
Hello. I'm back again with another issue and this time I really am not sure if this is an issue on my behalf or not.
When using a regular QMainWindow, connecting a QAction to a QDialog's
open()
slot works fine. The dialog's parent is the QMainWindow and it opens in the center, even after moving.Initial position
Position after being moved by cursor
However, if I connect that same QAction to the same
show()
slot, but this time have a QGoodWindow as its parent, this happens:Initial position
Position after being moved by cursor
If I use
move()
on the dialog's parent window before it being shown, that is used as the initial position instead.The text was updated successfully, but these errors were encountered: