What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript...

Preview:

Citation preview

What's unique to Qt

Junior High School at Otsuka, University of Tsukuba“Ubuntu Japanese Translators” team

luyikei盧 亦愷

Self Introduction①

・ I was born in Fukushima in 1997.・ Now I live in Tokyo.

・ When I began to use a computer at age 6,I had a mouse in my right hand, and a

baby bottle in my left hand

Self Introduction②

・ My first computer language is HTML.→Since I was 4th grade.

・ My second computer language is Visual Basic.→Since I was 7th grade.

・ My third computer language is Python→Since I was 8th grade.

・ I love Qt!→Since I was 9th grade.

Contents

・ My first Linux time

・ Why do I use Linux

・ How I develop GUI application on Linux

・ Visual C++ 2010 vs Qt4

・ Qt vs GTK+

・ What is unique to Qt4?

❶ My first Linux

・ I will talk about my Linux for the first time.

One day...

・ I was using computer with Windows.

&

SOTEC A4170AV Windows XP SP2

Ahhhhhhhhhhhhhhhhhh!

After a few days.

・ I checked my computer with Nortn Anti Virus...

Ahhhhhhhhhhhhhhhhhhhhh!

VS Virus360X

My first solution is ...

・ Recoveried with Symantec Ghost

After few weeks...

・ Again!

My second solution is...

・ Memtest86.

Give up!

・ I rescued my data from my computer with KNOOPIX live cd.→This time was first time to use Linux.

・ I managed to recover my computer by Replacing its memory.

old new

Now

I brought a new computer, and I installed Kubuntu.

❷ Why do I use Linux?

・ The reason is simple.①Ubuntu is easy to use!!!!!!!!!!!!!!!!!!!!

②I don't like Windows design.

③To study server build.

④Ubuntu is light!

⑤Software manage is easy.

⑥Linux is good at study programming

❸How I develop GUI application on Linux

My first GUI programming.

・ My first GUI programming is Visual Basic.→It is easy and quick. But...

Oh my God!

・ My software can't working on Linux!

onVisual Studio 2010(.net framework)

Linux

I hope ...

・ I want to developing software that runs both on Windows and onLinux.

My solution is...

→Learning Qt programming.

・ Qt is a cross-platform application framework .

・ Qt's native language is C++.

Qt works on ...①

Qt works on the following platforms:

・ Windows・ Windows CE・ Mac OS X・ Symbian・ Embedded Linux・ X Window System・ Wayland

Qt works on ...②

External ports:→Since Nokia opened the Qt source code

to the community on Gitorious various ports have been appearing. (by wikipedia)

・ OpenSolaris ・ Haiku・ OS/2 ・ iPhone ・ webOS・ Amazon Kindle・ Android・ BlackBerry

Qt is used by ...

KDEUbuntu Unity 2D Adobe Photoshop ElementsAdobe After Effects CS5Adobe Premiere Pro CS5Autodesk Maya 2011VLCNukeGoogle EarthSkypeQCadRosegardenMuseScoreMuse

Qt can fit your PC's Theme

Easy program developed by Qt①

・ I will make the program that can change letters on the button.

Step1

・ Set the button on the form.

Step2

・ Right-click on an button, and select “Go to slot...”

Step3

・ Select “clicked()”

Step4

・ Write code “ui->puchButton->setText(“aaa”);”

Step5

Clicked

・ It's complete. Run!

Easy program developed by Qt②

・ I will make the software without writing any code.

Step1

・ Set QDial on form.

Step2

・ Set QSlider on form too.

Step3

・ Connect Qdial with QSilder.

Step4

Setting up the SIGNAL and SLOT

SIGNAL: QDial - valueChangedSLOT: Qslider - setValue

Step5

・ Done!

valueChanged

❹Visual C++ 2010 vs Qt4

・ Round1: IDE

・ Round2: Speed

・ Round3: Other

Round1 : IDE

・ Visual Studio IDE

Round1 : IDE

・ Qt Creator

Code completion

・ Qt Creator ・ Visual Studio 2010 IDE (C++/CLI)

It hasn't code completion.!!

Layout

・ Qt Creator ・ Visual Studio 2010 IDE (C++/CLI)

・ Many layout tools

・ It has not good layout tools.

Round2: Speed

・ I'll compare the speed of Visual C++ 2010 with that of Qt4

・ Qt4 Code ・ Visual C++ 2010 Code

The resault is...

・ Qt4 ・ Visual C++ 2010

18

・ Qt4

2 SecondSecond

Wow!

Round 3 Other

・ font

Qt Creator Visual Studio IDE

Which is better?

enlargement

Qt4 Visual C++ 2010

Web Rendering engine

・ Qt4 is Webkit ・ Visual C++ 2010 is Trident

What is webkit?

・ Webkit is used by Safari , Google Chrome

Actually

・ WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE,

・ KHTML is the HTML layout engine developed by the KDE project.

・ It used by Konqueror.

・ Now Webkit is developed byApple, KDE, Nokia, Google, etc...

How about Trident?

・ Trident is used by Internet Explorer. X-)

I have built Simple Browser

With Qt4 With Visual C++ 2010 (C++/CLI)

And Judgment Browser type by Java Script

<SCRIPT type="text/javascript">

var userAgent = window.navigator.userAgent.toLowerCase();var appVersion = window.navigator.appVersion.toLowerCase();

if (userAgent.indexOf("msie") > -1) {if (appVersion.indexOf("msie 6.0") > -1) {

alert("IE6");}else if (appVersion.indexOf("msie 7.0") > -1) {

alert("IE7");}else if (appVersion.indexOf("msie 8.0") > -1) {

alert("IE8");}else {

alert("Unknown");}

}else if (userAgent.indexOf("firefox") > -1) {

alert("Firefox");}else if (userAgent.indexOf("opera") > -1) {

alert("Opera");}else if (userAgent.indexOf("chrome") > -1) {

alert("Google Chrome");}else if (userAgent.indexOf("safari") > -1) {

alert("Safari");}else {

alert("Unknown");}

</SCRIPT>

Resualt

・ Qt Browser is...Safari

・ Visual C++ Browser is...Internet Explorer 7

Which Is Better?

Acid2 Browser Test

Acid2 is a test page published and promoted by the Web Standards Project to expose web page rendering flaws in web browsers and other applications that render HTML.

Correct result

Result is...

Ahhhhhhhhhhhhhh!

Acid 3 Browser Test

Acid3 test is a web test page from the Web Standards Project that checks a web browser's compliance with elements of various web standards, particularly the Document Object Model (DOM) and JavaScript.

Correct result

Result is...

Ahhhhhhhhhhhhhh!

Support languages

・ Qt4・ Ada・ C++・ C# & .NET・ D・ Haskell・ Harbour・ Java・ Lisp・ Lua・ Pascal

・ Visual Studio・ Visual Basic・ Visual C#・ Visual C++

・ Perl・ PHP・ Python・ QML・ R・ Ruby・ Scheme・ Tcl ・ Qt4 wins landslide victory!!!

You can develop software with Qt now!

How about other GUI tool kit?

❺ Qt vs GTK+

vs

GTK+ works on ...

Official・ X Window System・ Windows・ Mac OS X

Developing...・ HTML5・ Wayland

GTK+ is lesser than Qt.

15 5:

IDE

Qt Creator Anjuta Qt Creator

GTK+ doesn't have an official IDE.And It's not easy to use than Qt Creater.

Hello World Program

・ Qt

#include <QtGui> int main(int argc, char *argv[]) { QApplication app(argc, argv); QLabel label("Hello, world!"); label.show(); return app.exec(); }

GTK+ is ...

#include <gtk/gtk.h> int main (int argc, char *argv[]) { GtkWidget *window; GtkWidget *label; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); g_signal_connect (window, "destroy", G_CALLBACK (gtk_main_quit), NULL); label = gtk_label_new ("Hello, World"); gtk_container_add (GTK_CONTAINER (window), label); gtk_widget_show_all (window); gtk_main (); return 0; }

Worst weakness

・ If you make a program of GTK+ except for GIMP and Pidgin, doesn't work Japanese input method on Windows and Mac OS X

❻ What is unique to Qt4?

Code less.

・ As I have already mentioned before, Qt is code less.

SIGNAL and SLOT

・ The mechanism of SIGNAL and SLOT,We don't need any code often!

Create more.

・ Qt has a good IDE that Qt Creater!

Deploy everywhere.

・ As I have already mentioned before,Qt is a cross-platform application framework .

Thank you!

・ Thank you for listening!I'll be happy if you like qt!

Recommended