<div dir="ltr">Can't get what you want exactly, but you can try this simple app:<div><br></div><div><div>require 'Qt4'</div><div><br></div><div>class Window < Qt::Widget</div><div><br></div><div>  def initialize(values)</div><div>    super(nil) # no parent</div><div><br></div><div>    @combo = Qt::ComboBox.new</div><div>    @combo.addItems(values)</div><div>    @layout = Qt::VBoxLayout.new</div><div>    @layout.addWidget(@combo)</div><div><br></div><div>    self.windowTitle = "Combo App"</div><div>    self.resize(300, 50)</div><div>    self.layout = @layout</div><div>  end</div><div><br></div><div>  def closeEvent(event)</div><div>    puts @combo.currentText</div><div>  end</div><div><br></div><div>end</div><div><br></div><div>if $0 == __FILE__</div><div>  app = Qt::Application.new(ARGV) # you may use the QApplication lastWindowClosed</div><div>  win = Window.new(('A'..'Z').to_a)</div><div>  win.show</div><div>  app.exec</div><div>end</div></div><div><br></div><div><a href="http://pastebin.com/CxtiA3SP">http://pastebin.com/CxtiA3SP</a><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 29, 2015 at 4:11 PM, Yvon Thoraval <span dir="ltr"><<a href="mailto:yvon.thoraval@gmail.com" target="_blank">yvon.thoraval@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm trying a simple app it shows in a combobox some values and I want to output the choosen value when quitting the app.<div>this little app will be use from command line that's the reason i want the choosen value to STDOUT.</div><div><br></div><div>best.</div><div><br></div></div>
<br>_______________________________________________<br>
Kde-bindings mailing list<br>
<a href="mailto:Kde-bindings@kde.org">Kde-bindings@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-bindings" target="_blank">https://mail.kde.org/mailman/listinfo/kde-bindings</a><br>
<br></blockquote></div><br></div>