Active Topics

 


Reply
Thread Tools
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#1
Hi everyone, i'm still slowly progressing on learning Pymaemo/QT etc... and got to the point where i can create the form, loads up fine, even figured out a few api calls - so feel like i'm doing well

I've learnt how to call commands from terminal and drag them into my program - yay go me!
(So far i have pulled the output from dpkg -l, still have to parse it all though!)

My next test is to put a picture into the form. More precisely i'm confirming the front camera works... so.... i'm calling this line from x-term

Code:
gst-launch v4l2camsrc device=/dev/video1 num-buffers=1 ! omx_jpegenc ! filesink location=fcamtest.jpg
So, now i have a sexy little fcamtest.jpg - i want to open that up in my qt form.

What is the best widget thing in QT designer to use to show a picture? - also.... as i will be calling the above code line, i am assuming i need to wait until it has completed before i can load the picture (And probably learn to parse an error message if needed) - but assuming it works fine, is there a line of code i can use to set the widget thing to show the image ie.
Code:
qtImageWidget.setImage("fcamtest.jpg")
(That is just a guess, hope you understand what i mean!)

Any help would be very much appreciated! (Bearing in mind i have a week or so experience in this field, i'm trying! hehe)
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 

The Following User Says Thank You to noobmonkey For This Useful Post:
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#2
Originally Posted by noobmonkey View Post

What is the best widget thing in QT designer to use to show a picture? - also.... as i will be calling the above code line, i am assuming i need to wait until it has completed before i can load the picture (And probably learn to parse an error message if needed) - but assuming it works fine, is there a line of code i can use to set the widget thing to show the image ie.
[CODE]

Any help would be very much appreciated! (Bearing in mind i have a week or so experience in this field, i'm trying! hehe)
You could use something as simple as a QLabel to display your image.

here is an example, but its in C++, maybe it will help you
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 

The Following User Says Thank You to krk969 For This Useful Post:
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#3
Originally Posted by krk969 View Post
You could use something as simple as a QLabel to display your image.

here is an example, but its in C++, maybe it will help you
Thank you very much krk969

ahaaaa Qlabel/Qpainter looks like exactly what i need!
Should be able to figure out the C++ -> python part
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#4
Change to my above
Code:
gst-launch v4l2camsrc device=/dev/video1 num-buffers=1 ! omx_jpegenc ! filesink location=fcamtest.jpg
Should read as
Code:
gst-launch v4l2camsrc device=/dev/video1 num-buffers=1 ! dspjpegenc ! filesink location=fcamtest.jpg
it saves a crappy quality pic - but does work
My next step is to get it showing in the label - coding directly onthe N900 at the mo! (woah!)
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#5
krk969 - it works - wohoooooo!
Posted my app in a new thread - but thank you so much for your help! - little things help to make bigger things, hehe

New thread for healthcheck app here
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
Reply

Tags
front camera, parse, pymaemo, qt designer, terminal


 
Forum Jump


All times are GMT. The time now is 09:11.