http://www.linuxnewsblog.com - Your Daily News

Wednesday, April 1, 2009

Python and Qt programming with Roberto Alsina

Roberto Alsina recently posted a series of tutorials about Python and PyQt on his blog. I don’t think they appeared on Planet KDE, so I’m forwarding them on. Eye-wink It covers typical Qt GUI programming using Qt Designer.

Most of the material is directly relevant if you want to develop KDE applications using Python, PyQt and PyKDE. Some differences of note are:

  • KDE widgets - KDE has many widgets that replace standard Qt widgets and extend them with better integration with the KDE desktop and more functionality. Assuming you’ve got the right packages installed, you should have extra KDE widgets available inside Qt Designer.
  • pykdeuic4 - The pyuic4 tool doesn’t understand or support KDE’s widgets. Use pykdeuic4 instead. It’s basically pyuic4 with added KDE support.
  • XMLGUI for menus and toolbars - KDE has support for defining menus, menu items and toolbars in an external XML file which will automatically be used if your application uses the KXmlGuiWindow class for its main window. This makes it easy for people to customise your application and saves you from having to write a lot of tedious and boring set up code.
  • Build system - Python takes a pretty low ceremony approach to most things including build systems. Usually you don’t need one, except perhaps during installation and/or packaging. In PyKDE in the kdebindings module, there should be an example Python project and directory called tools/cmake_project (exact location depends on your distribution). It is a basic project template which uses the CMake build system to correctly install your application and its data files, and doing things like generating .pyc files, and compiling .ui files to .py. It is a good base which can be expanded and customised. Some prior knowledge of CMake is required though.
  • Resources - We, or at least I, don’t use Qt style resources for handling images and data files etc. In a KDE application you’ll be installing your files, possibly using CMake and using the methods on the KStandardDirs class (via KGlobal.dirs()) to locate your data files.

Here are the links. Thanks Roberto!

Session 1
Session 2
Session 3
Session 4
Session 5



Read More...

[Source: Linux Blogs2k - Posted by FreeAutoBlogger]

Linux Contributions from Andrew

Recently, Andrew wrote me an email, which I shall pass on for the benefit of all:

Hi Scott
I started off writing a serious email, but your “why Santa Can’t Exist” converted me to tears of laughter, the story above it soon gave me a reality check, poor girl.

I was before I was interrupted with humour reading your blog posts on Linux, and was very impressed with the informative way that you write. We create video based tutorials and over the last 18 months we have been turning more of our resources to covering Linux based subjects. We have also been converting our videos to play in Flash as well as QuickTime, so Linux users don?t have to mess around installing 3rd party apps and invoke all kinds of trickery just to watch a simple training video.

I was wondering if you would consider offering some of our links to your visitors, I have listed the tutorials below that may be of interest:-

http://www.computer-training-software.com/opensuse.htm
http://www.computer-training-software.com/ubuntu-linux.htm
http://www.computer-training-software.com/ubuntu-server.htm
http://www.computer-training-software.com/ubuntu-certification.htm
http://www.computer-training-software.com/linux-security.htm
http://www.computer-training-software.com/lpi.htm
http://www.computer-training-software.com/lpic-2.htm
http://www.computer-training-software.com/linux.htm

Thanks, Andrew.



Read More...

[Source: Linux Blogs2k - Posted by FreeAutoBlogger]

New KDE Live-CD Release Brings Back Desktop Functionality

There have been endless complaints about the KDE4 desktop shell missing certain functionalities like being able to have different wallpapers on each virtual desktop. The openSUSE KDE team has now listened and worked hard to bring back all desktop functionality as you know it from KDE2. A technical preview in form of a Live-CD (for i686 only) is now available. As additional bonus, Time Machine functionality was included too.



Read More...

[Source: Linux Blogs2k - Posted by FreeAutoBlogger]