View Single Post
Posts: 341 | Thanked: 57 times | Joined on Nov 2009
#4
Alright I tried using a QMaemo5ListPickSelector together with a QMaemo5ValueButton, but when I click on the button, a popup dialog box does come up, but it doesnt any list ..

Here is a picture of what I mean:



This is the code I'm using to start up the above mentioned two components and to populate the lists:

Code:
    QMaemo5ValueButton *x = new QMaemo5ValueButton("Testing .. !");
    QStandardItemModel model (10,2);
    int j,k;
    for(j=0;j<=1;j++)
    {
        k=0;
        for(i=0;i<=9;i++)
        {
            QStandardItem *item = new QStandardItem(QString("%0").arg(k));
            k+=5;
            model.setItem(i,j,item);
        }
    }
    x->setValueLayout(QMaemo5ValueButton::ValueBesideText);
    QMaemo5ListPickSelector *sel = new QMaemo5ListPickSelector();
    sel->setModel(&model);

    x->setPickSelector(sel);
    hbox->addWidget(x);
I would say I'm probably populating the list incorrectly ..