maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   How do I build a Qt Quick project for Maemo in Qt Creator? (https://talk.maemo.org/showthread.php?t=65805)

kojacker 2010-11-17 23:29

How do I build a Qt Quick project for Maemo in Qt Creator?
 
Edit: Issue appears now resolved with a sdk update.

Original post:
After enjoying some Qt Quick presentations at the MeeGo conf Ive created my own example which runs well in the Qt Simulator. Unfortunately I am not able to build the same project targeting Maemo. I have two build issues, a "QtDeclarative/QDeclarativeView: No such file or directory" error and an "expected class name before '{' token" in the qmlapplicationviewer header file.

Quote:

#ifndef QMLAPPLICATIONVIEWER_H
#define QMLAPPLICATIONVIEWER_H

#include <QtDeclarative/QDeclarativeView>

class QmlApplicationViewer : public QDeclarativeView
{
public:
enum Orientation {
LockPortrait,
LockLandscape,
Auto
};

QmlApplicationViewer(QWidget *parent = 0);
virtual ~QmlApplicationViewer();

void setMainQmlFile(const QString &file);
void addImportPath(const QString &path);
void setOrientation(Orientation orientation);
void show();

private:
class QmlApplicationViewerPrivate *m_d;
};

#endif // QMLAPPLICATIONVIEWER_H
I have the latest Qt version, and I started by creating a Qt Quick Application. Is there something else I need to do to get this to build for Maemo?

Thanks.

uvatbc 2010-11-18 00:51

Re: How do I build a Qt Quick project for Maemo in Qt Creator?
 
Have you got
Code:

QT += declarative
in your pro file?

kojacker 2010-11-18 01:00

Re: How do I build a Qt Quick project for Maemo in Qt Creator?
 
Quote:

Originally Posted by uvatbc (Post 876631)
Have you got
Code:

QT += declarative
in your pro file?

I've added that at the top of the .pro file but it doesn't make a difference if i keep it in or delete it, i still get the same two errors on building with the Maemo target :(

uvatbc 2010-11-18 01:34

Re: How do I build a Qt Quick project for Maemo in Qt Creator?
 
Keep the QT+= declarative statement. It is required for qmake to set up makefile correctly.

I'm not sure as yet whats going on, so I'm going to fire some arrows into the dark:
1. I assume you're using Nokia SDK. Start the updater in qtcreator.
2. Just for fun do #include <QDeclarativeView> instead of the qualified include.
3. Rebuild all. qmake may not have run after making changes to your pro file, which means your Makefile may not be updated.

kojacker 2010-11-18 01:40

Re: How do I build a Qt Quick project for Maemo in Qt Creator?
 
Thanks uvatbc, some of those arrows in the dark might be what I need :)

Actually at the moment I am half way through reinstalling the SDK again. I tried updater on my previous installed version and I got some kind of online repository error.. so Ive uninstalled it and getting a fresh install from the Qt site. Fingers crossed that'll sort it out.

kojacker 2010-11-18 01:58

Re: How do I build a Qt Quick project for Maemo in Qt Creator?
 
I reinstalled and notice that the Qt version in the Build configuration for maemo is 'Qt for Fremantle 1.2 Devices' - I can't locate a 1.3 version on my machine, it doesn't seem to have been installed with the new SDK. Also the update from the start menu isnt in this version. So im thinking, should there be a "Qt for Fremantle 1.3 Devices" somewhere and where can I install it from? (Windows).

kojacker 2010-11-18 03:18

Re: How do I build a Qt Quick project for Maemo in Qt Creator?
 
I reinstalled the SDK a third time from a different link and it seems to get past further, but i now get a different error instead - this time related to packaging

Quote:

:: error: Packaging Error: Command 'dh_make -s -n -p testapp_qtquick_0.0.1' failed.Exit code: 1
Nothing has changed in the code files. Anyways Ive spent 5 hours on this so far, and it's 3.16am.. better get some sleep before work tomorrow.. I'm guessing this is a setup issue :rolleyes:

uvatbc 2010-11-18 03:35

Re: How do I build a Qt Quick project for Maemo in Qt Creator?
 
The fact that it has reached packaging means that the compilation should be successful. Time to run and debug before looking at package issues.

Edit: OTOH, perhaps its time to sleep and contemplate these issues after some rest.

Diph 2010-11-18 07:26

Re: How do I build a Qt Quick project for Maemo in Qt Creator?
 
Maybe you should try it without packing.

Select Projects (on the left in Qt Creator) -> Maemo Build steps -> Create package -> Skip packing step -> Try to run the application

nicolai 2010-11-18 07:35

Re: How do I build a Qt Quick project for Maemo in Qt Creator?
 
Quote:

Originally Posted by kojacker (Post 876708)
I reinstalled the SDK a third time from a different link and it seems to get past further, but i now get a different error instead - this time related to packaging

packaging error? --> don't use underscores in package
names :-)

nicolai


All times are GMT. The time now is 12:15.

vBulletin® Version 3.8.8