[Kst] branches/work/kst/portto4/kst/src/libkstapp
Nicolas Brisset
nicolas.brisset at eurocopter.com
Mon Oct 4 22:09:00 CEST 2010
SVN commit 1182518 by brisset:
Make sure tools based on QDialog and which show potentially long file
paths and/or vector names get maximize/minimize buttons on Windows. It
was the case under Linux (at least with kwin) but not under Windows.
Based on the examples/widgets/windowflags examples from the Qt
distribution this should solve the issue for Windows without changing
too much for Linux. Maybe we only need to add the context menu button?
M +3 -0 changedatasampledialog.cpp
M +3 -0 changefiledialog.cpp
M +4 -0 choosecolordialog.cpp
M +4 -0 datamanager.cpp
M +3 -0 datawizard.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/changedatasampledialog.cpp #1182517:1182518
@@ -27,6 +27,9 @@
: QDialog(parent) {
setupUi(this);
+ // Make sure the dialog gets maximize and minimize buttons under Windows
+ QWidget::setWindowFlags((Qt::WindowFlags) Qt::Dialog | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint);
+
if (MainWindow *mw = qobject_cast<MainWindow*>(parent)) {
_store = mw->document()->objectStore();
} else {
--- branches/work/kst/portto4/kst/src/libkstapp/changefiledialog.cpp #1182517:1182518
@@ -38,6 +38,9 @@
: QDialog(parent), _dataSource(0), _requestID(0) {
setupUi(this);
+ // Make sure the dialog gets maximize and minimize buttons under Windows
+ QWidget::setWindowFlags((Qt::WindowFlags) Qt::Dialog | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint);
+
if (MainWindow *mw = qobject_cast<MainWindow*>(parent)) {
_store = mw->document()->objectStore();
} else {
--- branches/work/kst/portto4/kst/src/libkstapp/choosecolordialog.cpp #1182517:1182518
@@ -29,6 +29,10 @@
: QDialog(parent) {
setupUi(this);
+
+ // Make sure the dialog gets maximize and minimize buttons under Windows
+ QWidget::setWindowFlags((Qt::WindowFlags) Qt::Dialog | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint);
+
grid = 0;
if (MainWindow *mw = qobject_cast<MainWindow*>(parent)) {
--- branches/work/kst/portto4/kst/src/libkstapp/datamanager.cpp #1182517:1182518
@@ -44,6 +44,10 @@
: QDialog(parent), _doc(doc), _currentObject(0) {
setupUi(this);
+
+ // Make sure the dialog gets maximize and minimize buttons under Windows
+ QWidget::setWindowFlags((Qt::WindowFlags) Qt::Dialog | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint);
+
_session->header()->setResizeMode(QHeaderView::ResizeToContents);
_session->setModel(doc->session());
_session->setContextMenuPolicy(Qt::CustomContextMenu);
--- branches/work/kst/portto4/kst/src/libkstapp/datawizard.cpp #1182517:1182518
@@ -41,6 +41,9 @@
: QWizardPage(parent), _pageValid(false), _store(store), _requestID(0) {
setupUi(this);
+ // Make sure the dialog gets maximize and minimize buttons under Windows
+ QWidget::setWindowFlags((Qt::WindowFlags) Qt::Dialog | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint);
+
connect(_url, SIGNAL(changed(const QString&)), this, SLOT(sourceChanged(const QString&)));
connect(_configureSource, SIGNAL(clicked()), this, SLOT(configureSource()));
More information about the Kst
mailing list