QMaemoListPickSelector 不显示任何内容

发布于 2024-09-06 22:27:19 字数 840 浏览 2 评论 0原文

好吧,我尝试将 QMaemo5ListPickSelector 与 QMaemo5ValueButton 一起使用,但是当我单击该按钮时,确实会出现一个弹出对话框,但它没有任何列表..

这是我的意思的图片:

alt text

这是我用来启动上述两个组件并填充列表的代码:

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);

我想说我可能错误地填充了列表..

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:

alt text

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

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 ..

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文