[rkward-cvs] SF.net SVN: rkward:[2552] trunk/rkward/rkward/dialogs/rkreadlinedialog.cpp

tfry at users.sourceforge.net tfry at users.sourceforge.net
Fri Jun 26 14:32:58 UTC 2009


Revision: 2552
          http://rkward.svn.sourceforge.net/rkward/?rev=2552&view=rev
Author:   tfry
Date:     2009-06-26 14:32:58 +0000 (Fri, 26 Jun 2009)

Log Message:
-----------
Set focus to input field of readline-dialog

Modified Paths:
--------------
    trunk/rkward/rkward/dialogs/rkreadlinedialog.cpp

Modified: trunk/rkward/rkward/dialogs/rkreadlinedialog.cpp
===================================================================
--- trunk/rkward/rkward/dialogs/rkreadlinedialog.cpp	2009-06-25 13:00:37 UTC (rev 2551)
+++ trunk/rkward/rkward/dialogs/rkreadlinedialog.cpp	2009-06-26 14:32:58 UTC (rev 2552)
@@ -2,7 +2,7 @@
                           rkreadlinedialog  -  description
                              -------------------
     begin                : Fri Sep 15 2006
-    copyright            : (C) 2006, 2007, 2008 by Thomas Friedrichsmeier
+    copyright            : (C) 2006, 2007, 2008, 2009 by Thomas Friedrichsmeier
     email                : tfry at users.sourceforge.net
  ***************************************************************************/
 
@@ -23,6 +23,7 @@
 #include <qapplication.h>
 #include <qdesktopwidget.h>
 #include <QScrollBar>
+#include <QTimer>
 
 #include <klocale.h>
 #include <kvbox.h>
@@ -87,6 +88,7 @@
 
 	RKReadLineDialog *dialog = new RKReadLineDialog (parent, caption, prompt, command);
 	if (!stored_geom.isNull ()) dialog->setGeometry (stored_geom);
+	QTimer::singleShot (0, dialog->input, SLOT(setFocus()));
 	int res = dialog->exec ();
 	*result = dialog->input->text ();
 	stored_geom = dialog->frameGeometry ();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list