maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   I can't get my Qt apps to run from the menu! Qt expertise needed! (https://talk.maemo.org/showthread.php?t=54914)

Rachel 2010-06-02 13:28

I can't get my Qt apps to run from the menu! Qt expertise needed!
 
Apologies if I am being a doik with this, but I am flummoxed -

I have a couple of small, simple Qt apps which I have recompiled and repackaged for Maemo5 PR 1.2 using Madde running on a Mac (lovely build environment, btw).

The apps run nicely on Mac and on Linux, and I am pretty sure that the apps are working fine. They even run fine on Windows, although obviously using Windows is not something I do, if I can avoid it.

They install nicely on the N900, but don't run when I tap the icons - or if they do run, they start to open up and then crash.

But if I start the applications from the command line, they run fine.

So, there is nothing wrong with the applications, it is obviously my packaging which has the problem.

As you can see, I am a noob at packaging applications. I created the packaging for the applications by following the MADDE instructions, ie

mad pscreate -t qt_simple newapp
/* add code etc */
mad qmake
mad make
mad dpgk-buildpackage

I also tried building the application in scratchbox, same problem - runs on command line but not from menu.

I've looked through this forum and found something about adding QT += maemo5 to the .pro file - tried this but no help.


Any hints about what I am missing out/doing wrong would be much appreciated.


cheers,


rache

mwerle 2010-06-02 14:42

Re: I can't get my Qt apps to run from the menu! Qt expertise needed!
 
I'm guessing you followed the Wiki article?

In particular, you have .services files for your apps?

Rachel 2010-06-02 17:44

Re: I can't get my Qt apps to run from the menu! Qt expertise needed!
 
Yes, I did read the wiki article, and yes I do have .service files for each app.

Still not working.




Edit: it's an article, not an app.

jmbowman 2010-06-02 18:04

Re: I can't get my Qt apps to run from the menu! Qt expertise needed!
 
You also need a little code in your app to register itself with D-Bus and respond to the appropriate signals. This article summarizes what's needed. I have this working in PortaBase, so you can look at its source code if you want another example. (I had the same problem initially, where the app would start up and run fine from the command line but crash if launched from the icon.)

gionni88 2010-06-02 18:07

Re: I can't get my Qt apps to run from the menu! Qt expertise needed!
 
Try : sudo chmod 771 executableabspath

If they don't open from menu but they do from command line it may be a privs trouble..

Rachel 2010-06-02 18:11

Re: I can't get my Qt apps to run from the menu! Qt expertise needed!
 
That looks like it - will go through the article and take a look at PortaBase tonight.


Thanks!

Rachel.

mwerle 2010-06-02 20:31

Re: I can't get my Qt apps to run from the menu! Qt expertise needed!
 
Quote:

Originally Posted by jmbowman (Post 696255)
You also need a little code in your app to register itself with D-Bus and respond to the appropriate signals.

I was under the obviously mistaken impression that the QT framework did that for you (can't locate source offhand). Thanks for the link.

Rachel 2010-06-03 14:01

Re: I can't get my Qt apps to run from the menu! Qt expertise needed!
 
Quote:

Originally Posted by mwerle (Post 696537)
I was under the obviously mistaken impression that the QT framework did that for you (can't locate source offhand). Thanks for the link.

You would have thought so, wouldn't you - it does everything else nicely.

App now working - the .desktop and .service files are created by the MADDE environment and only need app name and path changing. MADDE also adds the service.path and service.files lines into the .pro file - all I needed to add was the QDBusConnection calls to registerService and registerObject, the parts in the tutorial adding lines to the QMainWindow didn't need to be added.

PortaBase looks like a tidy app too!


Thanks again,


rache.


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

vBulletin® Version 3.8.8