Reply
Thread Tools
Posts: 200 | Thanked: 44 times | Joined on Jan 2010
#1
BIG EDIT TO MAKE THINGS CLEAR.

MADDE creation of files unclear if it works as of yet.

Scratchbox defernetly works for this.

Ok so you have created a widget using the template given by the guy above me and you want to test it on the device or simulator.

First of all you should compile your application in the same way you would a normal qt application for maemo.

Go to scratchbox decide on your target x86 or arm.

cd to the applications folder.

Then use.

"qmake"

then

"make"

You then have to create a .desktop file i used the one from the example and edited it for my application.The file must be lower case. very simple just change the name at X-path to your application name and change type= to type = qt. and change the name part so the correct name is sown in the add widget gui.

Then either cp "x86" or scp "arm" your files over dippending on weather you target the x86 emulator or the arm processor.

make sure when you scp a file to your mobile that you state the file you want to scp first then the location you want to deliver it to.

This had me stumped for a while because i was scp'ing from my mobile to my computer woops.

Location for files on mobile.

.desktop file
/usr/share/applications/hildon-home
Edit: .desktop file name must be lower case.

executable file
/usr/lib/hildon-desktop

Location for files on emulator.

.desktop file
/scratchbox/users/"computer login name"/target/Fremantel x86/usr/share/applications/hildon-home/

Executable file
/scratchbox/users/"computer login name"/target/Fremantel x86/usr/lib/hildon-desktop

Once this is done go to your x-term on the mobile/desktop "dippending if you are emulating or testing on device". locate the executable file.

Do "chmod 775 'executable file name'" without quotes or back ticks.

You dont realy need to do this on the emulator testing but its good to remember.

one last step make sure you have installed the qt-homescreen-loader can either be installed when istalling the examples for the homscreen widget opr installed seperatly thro apt-get.

Hint "apt-cache search" is your freind.

once the loader is installed go to the add widget section and you should see it there click to add it.

Bang and the work is done .

Have to love thos cilit bang adverts.

I will create this into a wiki if people would prefer with alot more detail.

If you fancy saying cheers just hit the thansk button .

Last edited by jamie721; 2010-05-30 at 09:37.
 

The Following User Says Thank You to jamie721 For This Useful Post:
Posts: 432 | Thanked: 645 times | Joined on Mar 2009
#2
Originally Posted by jamie721 View Post
Does anybody know how to test a widget on device. I have put the widget on the device and tryed running it it worked but for some reson it was full screen like an application so i thought maybe there is a special way to test.
Which Qt version are you using? How did you implement the widget? Please provide more details, that we can help

Anyway, here is a post about how to implement a widget and here you can dig into the code. Hope that helps.

Daniel
 

The Following 2 Users Say Thank You to danielwilms For This Useful Post:
Posts: 200 | Thanked: 44 times | Joined on Jan 2010
#3
BIG EDIT TO MAKE THINGS CLEAR.

MADDE creation of files unclear if it works as of yet.

Scratchbox defernetly works for this.

Ok so you have created a widget using the template given by the guy above me and you want to test it on the device or simulator.

First of all you should compile your application in the same way you would a normal qt application for maemo.

Go to scratchbox decide on your target x86 or arm.

cd to the applications folder.

Then use.

"qmake"

then

"make"

You then have to create a .desktop file i used the one from the example and edited it for my application.The file must be lower case. very simple just change the name at X-path to your application name and change type= to type = qt. and change the name part so the correct name is sown in the add widget gui.

Then either cp "x86" or scp "arm" your files over dippending on weather you target the x86 emulator or the arm processor.

make sure when you scp a file to your mobile that you state the file you want to scp first then the location you want to deliver it to.

This had me stumped for a while because i was scp'ing from my mobile to my computer woops.

Location for files on mobile.

.desktop file
/usr/share/applications/hildon-home
Edit: .desktop file name must be lower case.

executable file
/usr/lib/hildon-desktop

Location for files on emulator.

.desktop file
/scratchbox/users/"computer login name"/target/Fremantel x86/usr/share/applications/hildon-home/

Executable file
/scratchbox/users/"computer login name"/target/Fremantel x86/usr/lib/hildon-desktop

Once this is done go to your x-term on the mobile/desktop "dippending if you are emulating or testing on device". locate the executable file.

Do "chmod 775 'executable file name'" without quotes or back ticks.

You dont realy need to do this on the emulator testing but its good to remember.

one last step make sure you have installed the qt-homescreen-loader can either be installed when istalling the examples for the homscreen widget opr installed seperatly thro apt-get.

Hint "apt-cache search" is your freind.

once the loader is installed go to the add widget section and you should see it there click to add it.

Bang and the work is done .

Have to love thos cilit bang adverts.

I will create this into a wiki if people would prefer with alot more detail.

If you fancy saying cheers just hit the thansk button .

Last edited by jamie721; 2010-05-28 at 19:44.
 
Posts: 200 | Thanked: 44 times | Joined on Jan 2010
#4
Found solution you infact do not need to make it a shared libary executable is fine.
learnt alot from this today tho so im glad it wasnt to straight forward.
 
Posts: 435 | Thanked: 769 times | Joined on Apr 2010
#5
Originally Posted by jamie721 View Post
Found solution you infact do not need to make it a shared libary executable is fine.
learnt alot from this today tho so im glad it wasnt to straight forward.
So just the executabla and the .desktop files are needed for desktop widgets in qt? And which class do you subclass as a main window, QWidget or QDialog?
 
Posts: 200 | Thanked: 44 times | Joined on Jan 2010
#6
Yes just the executable file and .desktop file are needed to make the home screen widget.

But i would advise using scratchbox to compile as i was having major issues with getting it running when compiling with madde on windows.

I am no expert here but i think you NEED to use the base code from there example as it interfaces with X11.

Also i had to edit the examples .pro file by moving the include(qmaemo5homescreenadaptor.pri)
to the line below the template=app.

you may have read that you need the qt plugin loader to load qt home screen apps this is still true and you can get it by installing the qt4-homescreen-example as it is a dependancie. or i think you can install the plugin loader from atp-get.
 

The Following User Says Thank You to jamie721 For This Useful Post:
Posts: 200 | Thanked: 44 times | Joined on Jan 2010
#7
ok well i have my example working in scratchbox and xypher but i still can not get it to load on the mobile.

weirdly enough the hello world one does work so im stuck any help would greatly appreciated.
 
Posts: 200 | Thanked: 44 times | Joined on Jan 2010
#8
Ok i just decided to test something. I went to the directory on my n900 where the application part resides and tried to run it i got permission denied the tried to run the example and it ran so i think its a permissions issue.

Could anybody with experience with permissions help me fix this? As you can probably tell i am new ish to linux and dont understand every single concept as of yet.

Edit: just did ls -l to see permissions all other widgets have

-rw-r--r--

but mine has
-rwxr-xr-x

So question is how can i change from one to the other on the pnone?

Last edited by jamie721; 2010-05-27 at 00:02.
 
Posts: 200 | Thanked: 44 times | Joined on Jan 2010
#9
chmod 775 did it i now have my widget so hope fully onto packaging tomoz :S. lol it looks like a hole bag of fun.
 
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#10
Originally Posted by jamie721 View Post
Found solution you infact do not need to make it a shared libary executable is fine.
learnt alot from this today tho so im glad it wasnt to straight forward.
Hey, I'm also experimenting with this.
Could you please tell me how did you achieve it?

Is it possible with MADDE?
 
Reply


 
Forum Jump


All times are GMT. The time now is 00:18.