I just did the NSAViewver tutorial which deals with QtMultimedia and QCamera modules in particular. And I also found this tutorial very interesting. I did not know these modules at all and especially the QCamera module and its associated modules. Besides for me with this tutorial we have only touched on the possibilities of these modules
However, if I hadn’t had the code I would never have been able to finish it. Indeed, several things are missing:
- the code of def select_camera up to camera.start is not in the tags. It is not very legible.
- there is no code for change_folder, alert methods.
- the self status function is not present nor the self.save_path method at startup
- there is no main function at the end
Suggestion:
you should move the show function into the main function after defining the class
introduce a resize function in order to have a correct window when testing the interface this avoids resizing the window which is really small at launch without this addition of code.
I will also have a few questions:
The tutorial is based on a webcam but can it work with a camcorder, read it (ie display the stream in QVideoWidget or QMovie or QMediaplayerwidget) and/or record the stream of it using QMediaRecorder (or any other module?
If I record the stream with external software (ex dvgrab) Can we see the stream in real time ie during the recording which lasts about 1 hour
Usually, I use Qt Designer for my GUI’s. How can I do that with ? Must I promote a widget ?
Hey @Eolinwen thanks for the feedback
However, if I hadn’t had the code I would never have been able to finish it. Indeed, several things are missing:
The idea with the examples wasn’t to create “how to make X” tutorials, but to give the source code and then highlight the interesting/key parts. Maybe I should make that clearer, or actually write a walkthrough? I wasn’t sure whether it was really that useful vs. an actual tutorial.
There are tutorials on the multimedia bits of Qt coming (there is a new chapter in the upcoming update to the book too) which will go into the details a bit more.
The tutorial is based on a webcam but can it work with a camcorder,
I’ve not tried it, but I would think so – Qt doesn’t know whether it’s a webcam or not, just that it’s a live video feed. I’m also not sure if you can feed the video to two applications at once, but recording the feed from Qt should be possible.
Usually, I use Qt Designer for my GUI’s. How can I do that with ? Must I promote a widget ?
Promoting will work fine for these widgets (you can use QWidget as the base). You would still need to hook everything up in code though.
The idea with the examples wasn’t to create “how to make X” tutorials, but to give the source code and then highlight the interesting/key parts. Maybe I should make that clearer, or actually write a walkthrough? I wasn’t sure whether it was really that useful vs. an actual tutorial.
All right. I didn’t know, I thought these were tutorials like the others. Maybe it was a translation error on my part. However, it is not clear for beginners.
But, I found that some parts would deserve to be described ex in notepads methods update-useful, edit_toggle_wrag,…
There are tutorials on the multimedia bits of Qt coming (there is a new chapter in the upcoming update to the book too) which will go into the details a bit more.
Great news.
I’ve not tried it, but I would think so – Qt doesn’t know whether it’s a webcam or not, just that it’s a live video feed. I’m also not sure if you can feed the video to two applications at once, but recording the feed from Qt should be possible.
I’ll tried soon I will get a bit of free time. But on another computer. I could test the both i.e Webcam firstly and camcorder after.
Promoting will work fine for these widgets (you can use QWidget as the base). You would still need to hook everything up in code though
You confirm what I was thinking. Hum a QWidget. I’ll see that later soon. I must said that tutorials for PyQtGraph (the both) (and Matplotlib) have been a revelation for me.
Especially since one of them is a tutorial (the tax calculator one) Yeah, I should really just turn the into fully-fledged tutorials… more useful that way. As it is you need to know how it works to understand what it says.
You can actually use any widget as a base. But it’s a good idea to use the “nearest” if you can, since this means you can see all the correct properties in Qt Designer. So for example, if you used something that was a subclass of QListWidget
you’d used QListWidget
so you could change those props. Sometimes though QWidget
makes the most sense.
You can actually use any widget as a base. But it’s a good idea to use the “nearest” if you can, since this means you can see all the correct properties in Qt Designer. So for example, if you used something that was a subclass of QListWidget
you’d used QListWidget
so you could change those props. Sometimes though QWidget
makes the most sense.
Especially since one of them is a tutorial (the tax calculator one) Yeah, I should really just turn the into fully-fledged tutorials… more useful that way. As it is you need to know how it works to understand what it says.
Indeed. very nice tutorial BTW.
Hey @martin
I have the following tests after to transfer code on my laptop yesterday:
- just a webcam on my laptop=>works fine
- add my webcam on my laptopt=>works fines the both
- test with a camcorder DV=>nothing. QCamera doesn’t see it. I precise that I can pilot it with dvgrab (a Linux tool done for this task). I’m a bit disappointed but now we know the answer for that.
I’ll do others test later. I have missed something.