Ideas for new tutorials

Hi @martin.

I have found what I have send you in PM there are a while.

I would like to submit some tutorial ideas to you. Personally, I loved the 2 tutorials on PyQtGraph and specially this one with Qt Designer (because I use it everytime) and to “promote” widget. It has been a discovery.

So here is my little list of tutorials dealing with:

  • QSettings
  • QGraphicsView
  • QProcess in simple use (only one command) or with two processes (one after the other) for example a conversion
  • QProgressBar / Dialog in all cases cad integrated (most common), in “popup” cad outside of the main GUI, and modified (ie one can imagine having at least two progressbar, one ending and l other beginner)
  • tutorials dealing with external Python APIs (sorry but I haven’t seen any on the site) for example pyusb and / or python-same or libinsane all available on Github. These would interest a lot of people but above all they are well documented whether for the project itself but also and above all for the API. Another advantage is that they are not too large and complicated for understanding.

I have another one based on the Dashboard tutorial and that will be give you of the twine. But before I would like to test if I’m able to resolve this issue that I would like use soon in an application (and even too,I was thinking to somebody). And that’s could be another and unique great tutorial.

2 Likes

Great feedback thanks @Eolinwen – you’ll be glad to know these are on my list!

The good news – The book update will come with some extended progress bar examples, with multiple runners + also also multiple progress bars (combining with the modelview to produce a per-worker progress + a global one). For processes I’ll have a simple example of QProcess + communication. There is also an example running Python subprocess off a threadrunner (using subprocess) for communication – has some benefits for parsing output.

The bad news – the other two may not make it this time. QGraphicsView is a big one, I’ve started this + have plenty of examples, just trying to form it into something that’s both detailed enough to be useful + focused enough to fit in the book without becoming overwhelming. But you never know. Settings isn’t big itself, but it introduces some complexity for managing. I have a package I wrote for managing config in a nicer way, but it needs updating. I’d like to have a “nice” way to do it ready to go.

That said, the things that don’t make the book this time can still end up on the site before the next release!

Re: tutorials dealing with external APIs what do you mean exactly? The libraries you mention would all probably benefit from being spun off into another thread and communicated with via signals for IO with the app. If that’s what you mean, yep that’s in the book :wink:

1 Like

I am very Impatience about this. Only three weeks to wait. :hot_face:

QprogressBar/Qdialogprogress comes often in applications and the three types cover all situations.

QProcess is another way to pass a command (or a set of command or one command and just after another one when the first is finished). And if My skills are still good, there are two ways for that : asynchrous and synchrous (not sure of my translation as English is not my native language; sorry for that). But i know that you see what I speak.

QSettings are another way to keep configuration on a GUI/app. And that is used very often.
There are something that I 've not speak about QSettings and i would really be able to do that.
It is a confusing subject. Imagine the user who move is app/GUI on his screen (let’s say on the right) do his stuff close the app. The day after he is open his window and she has keep his position i.e she is still on the right of his screen.
Another thing. Always in the same idea i.e about window geometry. Imagine the user would like to increase his GUI/app and give it a look. Do his stuff close the app. The day after he is open his window and she has keep his size. And the best mix them and you have won a great and personalized app. :stuck_out_tongue_winking_eye:

The bad news – the other two may not make it this time. QGraphicsView is a big one, I’ve started this + have plenty of examples, just trying to form it into something that’s both detailed enough to be useful + focused enough to fit in the book without becoming overwhelming. But you never know. Settings isn’t big itself, but it introduces some complexity for managing. I have a package I wrote for managing config in a nicer way, but it needs updating. I’d like to have a “nice” way to do it ready to go.

Indeed. QGraphicsViewwith QGraphicsScene/QGraphicsItem are a big part. I’m pretty curious how do you deal this subject. Perhpas two tutorials will be necessary.

I have another great idea of tutorial that I’ve never seen anyway (in fact yes just at a place) and adapted to one of your existing tutorial. But I will open another post for this one.

Python is a great and very popular language. And you can find an API for all.
And often a developer of an API document it.
Take the simple example of python-sane or libinsane. You have the same thing for libevdev or python-evdev (it is the same thing about the same subject).
If you search a bit you 'll find a section call API. And this one can be embedded in a GUI.
I hope that I have been a bit more clear.

In Goodforbitcoin, you have deal about web API but the desktop API are working differently and for a beginner it would be a good start.

For a beginner it is annoying and confusing because you can make things in two approaches.
For sample, you have subprocess/QProcess, configparser/QSettings, …You have even in QT several approach pyuic and uic for GUI done with QTDesigner. And your tutorials we point us in the good direction.

I further clarify my thoughts about QProgressBar and QProcess. Would it be possible to mix the 2? From a multiplatform command line program such as ffmpeg and a simple command which would give as command:
ffmpeg -inputfile.mp4 -o outputfile.avi
or
ffmpeg -i inputfile.avi -y -target pal-dvd -sameq -aspect 16:9 outputfile.mpg

all while also using QRunnable and QThreadpool for both (QProgressBar and QProcess) .
This would close the loop.

There are other subjects that I have not mentioned previously. in saying this, I think of two other modules commonly used in programs:

  • QSplashScreen which allows you to create a splashscreen (with several messages and use of processevent to refresh the text)
  • QWizard which allows you to create a Wizard.