The QML Presentation System

The QML Presentation System

Wednesday, October 2, 2013

With Qt Developer Days 2013 rapidly approaching, a number of Qt developers are busy preparing presentations for the conference, myself included. I thought it would be timely to give an overview of the QML Presentation System.

Introduction

The QML Presentation System is a QML-based piece of software that allows you to quickly write presentations in the QML language and display them on any desktop system that supports Qt 5.

Installation

The software is hosted at qt.gitorious.org here. You can check out the code from git by running

    git clone git@gitorious.org:qt-labs/qml-presentation-system.git

Once you have the source, it can be built by running qmake and then make install. You may need to be running as the root user on Linux systems, depending on where Qt is installed. The software is written entirely in QML. See the included README file for the latest build and installation instructions.

Using It

It comes with some examples. I suggest you start with the basic one, examples/tutorial/SlideDeck.qml. To run it, like any presentation written using the system, just invoke it using the qmlscene program. Below is a screen shot of the example running:

The QML elements provided for presentations are very simple and the tutorial example should be enough to get you going. While it looks simple, you have all the capabilities of the full QML language available for implementing your presentations.

You can navigate using a mouse. The left button moves to the next slide and the right button to the previous slide. On a touchscreen, a touch moves to the next slide while press and hold moves to the previous one. Several keyboard commands are also supported. Pressing <space>, <right cursor> or <down cursor> advances to the next slide. Pressing <backspace>, <left cursor> or <up cursor> advances to the previous slide. Hitting <Esc> will quit the program and key <C> will cause the slide to fade to black, which is convenient when answering questions. Pressing it again will restore the slide. If you enter a number followed by <Return>, the presentation will advance to the appropriately numbered slide.

Additional examples can be found under the examples directory. These show how to do transitions, animations and display a separate window for speaker's notes.

The default size of a presentation is defined into the presentation's QML file. You can pass the --fullscreen command line option to the qmlviewer program to show a presentation in full screen mode.

As a final example, below are two slides from a presentation I am preparing for a lightning talk at Qt Developer Days:

In the directory tools/printslides, there is a small utility that will generate a PDF file from your slide deck to facilitate viewing or printing.

Summary

If you want to put together a presentation with reasonably modest requirements and perhaps want to showcase the use of QML, consider using the QML Presentation System.

Feel free to help contribute new features to the software. Personally, what I would like to see is a converter to and from LibreOffice Impress format so that standard presentation files could be imported and exported.

Interested in Qt & QML?

Read more articles from the category Qt & QML

Tags:

About the author

Jeff Tranter

Bio:

Jeff Tranter is a Qt Consulting Manager at ICS. Jeff oversees the architectural and high-level design of software systems for clients. Jeff’s leadership organizes global teams of developers on desktop and embedded applications.

Comments

Submitted by wuming123057 on
Comment: 

Slide {

title: "Composition"

content:

}

 

I must translate above code  to chinese.Affter I add qsTr() ,this can't work.

So I want to konw ,How I use in internationalization?

Submitted by jtranter on
Comment: 
I don't know if this is supported. I will investigate this and let you know what I find. Off the top of my head I would think that separate presentations would normally be done for each language rather than trying to localize a single presentation, at least that's the way that traditional presentations tools like PowerPoint are normally done, but it is an interesting idea.

Submitted by jtranter on
Comment: 
There is a "-translation" option to qmlscene that allows specifying a translation (.qm) file, and I am able to get it to load the file, but translated text is not appearing. I would need dig deeper into what qmlscene is doing to determine why. However, I think in any real presentation you will want to write it for each language to get the formatting you want rather than trying to have it localized at run time. Typically there will be things like images in a presentation that you want to localize by hand for each language.

Submitted by wuming123057 on
Comment: 

” In any real presentation you will want to write it for each language to get the formatting you want rather than trying

to have it localized at run time“,it's right. I'm looking forward to  the new version released.

Pages