Reply
Thread Tools
Posts: 341 | Thanked: 57 times | Joined on Nov 2009
#1
Hey guys .. I recently tried to use some Maemo5 specific classes (e.g. QMaemo5ListPickSelector, etc ..), and I'm getting some strange compile time errors ..

Here is a small code I was trying out:

Code:
QMaemo5ValueButton *x = new QMaemo5ValueButton("Hello");
    QStandardItemModel model (10,2);
    int i,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);

    QHBoxLayout *hbox = new QHBoxLayout();
    hbox->addWidget(x);

    QVBoxLayout *vbox = new QVBoxLayout();
    vbox->addLayout(hbox);
    vbox->addWidget(canvas);

    scrollArea->setLayout(vbox);

    setCentralWidget(scrollArea);
And this is the error I get:



And this is the same error in more detail:



I have installed the complete Nokia Qt SDK, and that is what is being used here as well ... The Maemo5 specific libraries are only 'seen' when I select 'Maemo' as the output device ..

Anyone know how can I fix these errors .. ?

I had a hard time configuring Qt Creator the first time round as well, and I really dont want to have to all kinds of un/re-installs all over again
 
w00t's Avatar
Posts: 1,055 | Thanked: 4,107 times | Joined on Oct 2009 @ Norway
#2
I have a feeling about this. Can you zip your project up and make it available somewhere so I can take a look?
__________________
i'm a Qt expert and former Jolla sailor (forever sailing, in spirit).
if you like, read more about me.
if you find me entertaining, or useful, thank me. if you don't, then tell me why.
 
Posts: 90 | Thanked: 311 times | Joined on Mar 2010
#3
I'm not familiar with QtCreator; but I did get similar errors on a project because I forgot including the QtMaemo5 header and adding QT += maemo5 to the project file.
 

The Following 2 Users Say Thank You to cpulvermacher For This Useful Post:
Posts: 341 | Thanked: 57 times | Joined on Nov 2009
#4
Originally Posted by w00t View Post
I have a feeling about this. Can you zip your project up and make it available somewhere so I can take a look?
Just sent the files to you ..

Originally Posted by cpulvermacher View Post
I'm not familiar with QtCreator; but I did get similar errors on a project because I forgot including the QtMaemo5 header and adding QT += maemo5 to the project file.
Just tried both your ideas .. didn't help
 
w00t's Avatar
Posts: 1,055 | Thanked: 4,107 times | Joined on Oct 2009 @ Norway
#5
Right. Thanks.

Your problem is that you added the QMaemo5ValueButton header to your project. This isn't the right way to use Qt components - you should only add your own header/cpp files to the .pro.

I presume you did this because you couldn't figure out how to use QMaemo5ValueButton?

Open DrawingTest2.pro
Remove:
../../../../../NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1014-slim/usr/include/QtMaemo5/qmaemo5valuebutton.h
and change:
qpushbuttonx.h \
to
qpushbuttonx.h

Then, go to the top of the file, and change:
QT += core gui
to:
QT += core gui maemo5

This is because the QMaemo5 classes are in a different Qt 'module', so you need to tell the build system that your project uses classes from the maemo5 module.

Hope this helps. If you need more help, just ask.
__________________
i'm a Qt expert and former Jolla sailor (forever sailing, in spirit).
if you like, read more about me.
if you find me entertaining, or useful, thank me. if you don't, then tell me why.
 

The Following 5 Users Say Thank You to w00t For This Useful Post:
Posts: 341 | Thanked: 57 times | Joined on Nov 2009
#6
^^ wow thanks man, that fixed the issue in a heartbeat .. now I know who to come to when I need more help :P

Thanks again !
 

The Following 2 Users Say Thank You to ahmadka For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 13:42.