[Qt-interest] What is the mistake in this code

Ramesh ramesh.bs at robosoftin.com
Fri Jun 4 13:09:51 CEST 2010


Hey,

can you geeks can tell me the solution for this,

i have a listview, when i tap on any item,a pop-up list should appear, after
that based on the selected item from pop-up list i will update my UI.

i have written a code to get the popup list after tapping on any item from
my view.

my problem is once i tap on any item, will get a popup list and i will also
be able to select the item from popup list. once i press Ok in popup list i
will ge a list with combo box also, i dont no what is wrong.. here is my
code to get the popup list, please assist me where i am wrong

void myPopupWindow::Popupdialog()
    {
      QInputDialog inputdialog;
      QStringList items;
             items << tr("Spring") << tr("Summer");


     // bool val =
QObject::connect(inputdialog,SIGNAL(textValueChanged(const QString
&text)),this,SLOT(selText( const QString & text )));
           bool val =
QObject::connect(&inputdialog,SIGNAL(textValueChanged(const QString
&)),this,SLOT(selText(const QString &)));

           bool ok;

 
inputdialog.setOptions(QInputDialog::UseListViewForComboBoxItems);
           inputdialog.setComboBoxItems(items);
           inputdialog.exec();

           QString item = inputdialog.getItem(this,
tr("QInputDialog::getItem()"),tr("Season:"), items, 0, false, &ok);


    }

 


-----------------------------------------------
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100604/433fd69d/attachment.html 


More information about the Qt-interest-old mailing list