summaryrefslogtreecommitdiffabout
path: root/qtcompat/qinputdialog.cpp
Unidiff
Diffstat (limited to 'qtcompat/qinputdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--qtcompat/qinputdialog.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/qtcompat/qinputdialog.cpp b/qtcompat/qinputdialog.cpp
index 770b281..64c581e 100644
--- a/qtcompat/qinputdialog.cpp
+++ b/qtcompat/qinputdialog.cpp
@@ -32,12 +32,14 @@
32** 32**
33** Contact info@trolltech.com if any conditions of this licensing are 33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you. 34** not clear to you.
35** 35**
36**********************************************************************/ 36**********************************************************************/
37 37
38//Edited Lutz Rogowski 2004-12-13
39
38#include "qinputdialog.h" 40#include "qinputdialog.h"
39 41
40#include <qlayout.h> 42#include <qlayout.h>
41#include <qlabel.h> 43#include <qlabel.h>
42#include <qlineedit.h> 44#include <qlineedit.h>
43#include <qpushbutton.h> 45#include <qpushbutton.h>
@@ -450,12 +452,17 @@ QString QInputDialog::getItem( const QString &caption, const QString &label, con
450 dlg->comboBox()->insertStringList( list ); 452 dlg->comboBox()->insertStringList( list );
451 dlg->comboBox()->setCurrentItem( current ); 453 dlg->comboBox()->setCurrentItem( current );
452 } 454 }
453 455
454 bool ok_ = FALSE; 456 bool ok_ = FALSE;
455 QString result; 457 QString result;
458 int fixWid = 320;
459 if ( QApplication::desktop()->width() <= 240 ) {
460 fixWid = 230;
461 }
462 dlg->setFixedWidth( fixWid);
456 ok_ = dlg->exec() == QDialog::Accepted; 463 ok_ = dlg->exec() == QDialog::Accepted;
457 if ( ok ) 464 if ( ok )
458 *ok = ok_; 465 *ok = ok_;
459 if ( editable ) 466 if ( editable )
460 result = dlg->editableComboBox()->currentText(); 467 result = dlg->editableComboBox()->currentText();
461 else 468 else