what's unique to qt - events.static.linuxfound.org · ・webkit's html and javascript...

75
What's unique to Qt Junior High School at Otsuka, University of Tsukuba “Ubuntu Japanese Translators” team luyikei 盧 亦愷

Upload: others

Post on 21-May-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

What's unique to Qt

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

luyikei盧 亦愷

Page 2: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

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

Page 3: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

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.

Page 4: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

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?

Page 5: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

❶ My first Linux

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

Page 6: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

One day...

・ I was using computer with Windows.

&

SOTEC A4170AV Windows XP SP2

Page 7: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Ahhhhhhhhhhhhhhhhhh!

Page 8: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

After a few days.

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

Page 9: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Ahhhhhhhhhhhhhhhhhhhhh!

VS Virus360X

Page 10: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

My first solution is ...

・ Recoveried with Symantec Ghost

Page 11: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

After few weeks...

・ Again!

Page 12: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

My second solution is...

・ Memtest86.

Page 13: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

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

Page 14: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Now

I brought a new computer, and I installed Kubuntu.

Page 15: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

❷ 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

Page 16: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

❸How I develop GUI application on Linux

Page 17: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

My first GUI programming.

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

Page 18: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Oh my God!

・ My software can't working on Linux!

onVisual Studio 2010(.net framework)

Linux

Page 19: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

I hope ...

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

Page 20: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

My solution is...

→Learning Qt programming.

・ Qt is a cross-platform application framework .

・ Qt's native language is C++.

Page 21: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Qt works on ...①

Qt works on the following platforms:

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

Page 22: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

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

Page 23: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Qt is used by ...

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

Page 24: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Qt can fit your PC's Theme

Page 25: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Easy program developed by Qt①

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

Page 26: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Step1

・ Set the button on the form.

Page 27: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Step2

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

Page 28: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Step3

・ Select “clicked()”

Page 29: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Step4

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

Page 30: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Step5

Clicked

・ It's complete. Run!

Page 31: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Easy program developed by Qt②

・ I will make the software without writing any code.

Page 32: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Step1

・ Set QDial on form.

Page 33: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Step2

・ Set QSlider on form too.

Page 34: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Step3

・ Connect Qdial with QSilder.

Page 35: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Step4

Setting up the SIGNAL and SLOT

SIGNAL: QDial - valueChangedSLOT: Qslider - setValue

Page 36: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Step5

・ Done!

valueChanged

Page 37: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

❹Visual C++ 2010 vs Qt4

・ Round1: IDE

・ Round2: Speed

・ Round3: Other

Page 38: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Round1 : IDE

・ Visual Studio IDE

Page 39: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Round1 : IDE

・ Qt Creator

Page 40: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Code completion

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

It hasn't code completion.!!

Page 41: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Layout

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

・ Many layout tools

・ It has not good layout tools.

Page 42: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Round2: Speed

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

・ Qt4 Code ・ Visual C++ 2010 Code

Page 43: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

The resault is...

・ Qt4 ・ Visual C++ 2010

18

・ Qt4

2 SecondSecond

Wow!

Page 44: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Round 3 Other

・ font

Qt Creator Visual Studio IDE

Which is better?

Page 45: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

enlargement

Qt4 Visual C++ 2010

Page 46: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Web Rendering engine

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

Page 47: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

What is webkit?

・ Webkit is used by Safari , Google Chrome

Page 48: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

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...

Page 49: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

How about Trident?

・ Trident is used by Internet Explorer. X-)

Page 50: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

I have built Simple Browser

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

Page 51: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

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>

Page 52: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Resualt

・ Qt Browser is...Safari

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

Page 53: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Which Is Better?

Page 54: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

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

Page 55: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Result is...

Page 56: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Ahhhhhhhhhhhhhh!

Page 57: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

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

Page 58: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Result is...

Page 59: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Ahhhhhhhhhhhhhh!

Page 60: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

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!!!

Page 61: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

You can develop software with Qt now!

Page 62: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

How about other GUI tool kit?

Page 63: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

❺ Qt vs GTK+

vs

Page 64: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

GTK+ works on ...

Official・ X Window System・ Windows・ Mac OS X

Developing...・ HTML5・ Wayland

GTK+ is lesser than Qt.

15 5:

Page 65: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

IDE

Qt Creator Anjuta Qt Creator

Page 66: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

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

Page 67: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

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(); }

Page 68: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

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; }

Page 69: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

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

Page 70: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

❻ What is unique to Qt4?

Page 71: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Code less.

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

Page 72: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

SIGNAL and SLOT

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

Page 73: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Create more.

・ Qt has a good IDE that Qt Creater!

Page 74: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Deploy everywhere.

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

Page 75: What's unique to Qt - events.static.linuxfound.org · ・WebKit's HTML and JavaScript code originally began as a fork of the KHTML and KJS libraries from KDE, ・ KHTML is the HTML

Thank you!

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