ui: subwindow when resize mainwindow

* disable drop in qtlineedit
    fixes bug where when file is dropped in the lineedit with text,
    the the file will be added as text midst the existing text
* move message to start from script before layout loading so it will load right
(only when started without script on linux)
* center subwindow when mainwindow size changes
This commit is contained in:
Andreas Stallinger
2017-06-08 20:42:32 +02:00
parent 699de2ee0a
commit 419a2e27ba
8 changed files with 75 additions and 51 deletions
+17
View File
@@ -1,5 +1,7 @@
#include "qt/window/QtWindowStack.h"
#include "qt/window/QtWindow.h"
QtWindowStackElement::QtWindowStackElement(QWidget* parent)
: QWidget(parent)
@@ -71,6 +73,21 @@ void QtWindowStack::popWindow()
}
}
void QtWindowStack::centerSubWindows()
{
for (QtWindowStackElement* window : m_stack)
{
QtWindow* qtWindow = dynamic_cast<QtWindow*>(window);
if (qtWindow)
{
if (qtWindow->isSubWindow())
{
qtWindow->moveToCenter();
}
}
}
}
void QtWindowStack::clearWindows()
{
for (QtWindowStackElement* window : m_stack)