[Kde-bindings] QComboBox and QListBoxItem

Imobach González Sosa imodev at softhome.net
Fri Apr 2 22:57:20 UTC 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

Well, maybe the solution is pretty simple, but I'm having a little problem
when trying to get into a combo box some list box items (QListBoxItem). I'm 
sure that the problem is me ;-)

I'm using Ruby, but I think that the procedure could be the same (the idea)
using other languages.

First of all, I create a QComboBox, a ListBox and a ListBoxItem. Then, I add
some items to the ListBox and associates it to the ComboBox. Something like:

  @combo = Qt::ComboBox.new(false, centralWidget(), "@combo")
  @combo.setGeometry( Qt::Rect.new(20, 59, 105, 33) )

  list  = Qt::ListBox.new(@combo)

  item  = Qt::ListBoxItem.new
  item.setText("oranges")

  list.insertItem(item)
  @combo.setListBox(list)

Is it right? Well, I guess no, because I obtained a combo box which, when I
click on it, shows only the begining of the list... well, it's difficult to
explain. It's like if the list was cutted near the top, and no values appear.

Ideas? Thank you all in advance.

- -- 
(o_.'   Imobach González Sosa   imobachgs at softhome.net
//\c{}  imobachgs at step.es       a2419 at dis.ulpgc.es
V__)_   imodev at softhome.net     osoh en jabber.at y jabber.org
        Usuario Linux #201634
Debian GNU/Linux `Sarge' con núcleo 2.6.4 sobre Intel Pentium 4

La tradición es la personalidad de los imbéciles.
		-- Maurice Ravel. 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAbe/Uw8EmcZIjnzgRAiL2AJsHOtFrZn97JfaNKPLJCRqY+tQaDwCeIEXP
xceHD+gbsHLWYsVhkBEbiVg=
=6frU
-----END PGP SIGNATURE-----



More information about the Kde-bindings mailing list