maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   rookie tutorial (https://talk.maemo.org/showthread.php?t=56274)

Qrchack 2010-06-15 17:42

rookie tutorial
 
Hello everyone.

I would really enjoy the step by step tutorial for setting up a development environment necessery to write simple programms for n900.

I need to say that I'm complete newbie. I have never programmed on any mobile platform i have no experience in programming on linux. I do, however, have some c/c++ skills, which i would like to use for my phone.

It would be nice to find some basic, and easy to understand tutorial. I mean, i need something like:
- download this software
- install it there
- use the command
- run this
- type that
- start the software
- set this functions like this, deselect others
- start programming ;)

As i said - i have no experience in mobile platforms, and the only thing i know is that setting up here is much different that installing borland builder on windows.

I will appreciate any help

And I am very sorry if there was similar topic before. There was 20 pages of results when i typed tutorial, rookie or newbie. I lost patience after digging the fifth :/

PS: my goal is to write simple games, controlled by touchscreen and keyboard, no need for any network capabilites, system functions and so on.

Jaso333 2010-06-15 17:56

Re: rookie tutorial
 
Nokia QT SDK

If, like me, you hate working with Linux when you are already used to working in a windows environment, download the sdk from the link above.

From then on, you can create and deploy applications to your N900 all from one application called QT Creator (included in package above).

The great thing about QT is that it is cross-platform, meaning you can just follow any QT tutorial out there, the program will work in windows and the N900!

As you said, you want to create games, so the QPainter class would be something to look into, along with all of the other image manipulation libraries.

Qrchack 2010-06-15 18:08

Re: rookie tutorial
 
thx for reply, i will definitely take a look on that:)

But beware, it is very likely, that i will post questions in this thread, as i mentioned before, i am a rookie :)

Jaso333 2010-06-15 18:46

Re: rookie tutorial
 
i post questions all the time, thats what this forum is for.

bluetalk 2010-06-16 10:16

Re: rookie tutorial
 
I have downloaded qt creator as well but cant get it to port to the n900 .. I can send apps to the nokia 5800 or the x6 but not to the n900 ..... been asking for tutorials on this for a few weeks now.

danielwilms 2010-06-16 11:38

Re: rookie tutorial
 
Hi,

Quote:

Originally Posted by bluetalk (Post 717308)
I have downloaded qt creator as well but cant get it to port to the n900 .. I can send apps to the nokia 5800 or the x6 but not to the n900 ..... been asking for tutorials on this for a few weeks now.

have you downloaded just the QtCreator or the Nokia Qt SDK? The latter one contains everything you need for development with Qt for the N900. A description on how you can test your program on the device you will find here for example for Linux. There are as well descriptions for other OS in the wiki.

Daniel

Jaso333 2010-06-16 17:46

Re: rookie tutorial
 
make sure you set the build target to FREMANTLE (Maemo PR1.2 Devices) when you create the project. It allows you to create S60 projects which is the ones you have been creating.

Qrchack 2010-06-20 17:03

Re: rookie tutorial
 
Damn, call me, what you want, but i'm stuck and i cannot find a way out :/

Well i started with application with button, text field and a label. And i cannot fill my stuff with life. Standard way to double click on an item to move to code section, and adding some "basic" code for an event (like in c++builder or Visual Studio) doesn't work here.

How am i suppose to add some code to "on click" event, when dblclicking on item doesn't show(add) it?

Qrchack 2010-06-20 17:10

Re: rookie tutorial
 
Ok. I'm sorry... i found a solution...
go to slot -> not very intuitive, but works.

Qrchack 2010-06-20 17:27

Re: rookie tutorial
 
Damn, another problem...

How can i change properties of items? I have three items on my form:
pushbutton named knefel
label named label1 and
text field named text1.

I would like to copy a text from text1 to label1 when 'knefel' is pressed.
In builder i would type
label1->text = text1->text
but it doesn't work here.

How can i "call" items in qt?

Qrchack 2010-06-20 18:18

Re: rookie tutorial
 
ok, looking into exaples helps...

But why they made it so difficult. Why one need to access ui to access items? Eh...

Jaso333 2010-06-21 17:48

Re: rookie tutorial
 
Quote:

Originally Posted by Qrchack (Post 722828)
ok, looking into exaples helps...

But why they made it so difficult. Why one need to access ui to access items? Eh...

You are thinking too much in terms of Visual Studio. Microsoft have made it extremely easy for you add events to buttons. In the world of QT, it is different. Instead of EVENTS you have SIGNALS. Instead of HANDLERS you have SLOTS.

In Visual Studio, you have your window which also acts as your main class, where you do all of the coding, that's why you can access the controls directly through the code without a preceding class name. If you were to have your main form class separate from your main code class, you would have to access it exactly like you would in QT. In QT, 'ui' is in its own separate class, which is why you need to specify it when accessing the widgets (Visual Studio equivalent of 'widgets' is 'controls').

Qrchack 2010-06-24 09:04

Re: rookie tutorial
 
yeah i see that now, and i'm getting used to it... However, not only microsoft handles events, or signals (as they are named here), in that manner. Borlands also does.

Remember, i mentioned borland builder in my first post? Power of old habits, eh...

Anyway, i'm getting used to it, but still have some...objections. WHY double clicking the item doesn't move directly to "slot"?
And i cannot understand, why text fields doesn't accept numeric values, or more generally, why QString class doesn't? It makes programmer looking for other solutions, while it could be done faster. Yes, like in MS Visual Studio or Builder.

PS: thank u for word - control(s). I totally forgot how they are called in english ;)

Diph 2010-06-25 08:09

Re: rookie tutorial
 
http://doc.qt.nokia.com/qt-maemo-4.6/index.html

There are Tutorials and Examples you might want to look.

You can also access the documentation from Qt Creator by selecting Help tab.


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

vBulletin® Version 3.8.8