0% found this document useful (0 votes)
5 views

Hands On GUI Programming with C and Qt5 Build stunning cross platform applications and widgets with the most powerful GUI framework 1st Edition Eng Lee Zhi download

The document provides information about the book 'Hands-On GUI Programming with C++ and Qt5' by Lee Zhi Eng, which teaches readers how to build cross-platform applications using the Qt framework. It includes links to various related ebooks and resources, as well as details about the author and the publishing company. The content covers a range of topics from basic Qt concepts to advanced features like database connections and web content integration.

Uploaded by

verekrozita
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Hands On GUI Programming with C and Qt5 Build stunning cross platform applications and widgets with the most powerful GUI framework 1st Edition Eng Lee Zhi download

The document provides information about the book 'Hands-On GUI Programming with C++ and Qt5' by Lee Zhi Eng, which teaches readers how to build cross-platform applications using the Qt framework. It includes links to various related ebooks and resources, as well as details about the author and the publishing company. The content covers a range of topics from basic Qt concepts to advanced features like database connections and web content integration.

Uploaded by

verekrozita
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Hands On GUI Programming with C and Qt5 Build

stunning cross platform applications and widgets


with the most powerful GUI framework 1st Edition
Eng Lee Zhi download
https://ebookmeta.com/product/hands-on-gui-programming-with-c-
and-qt5-build-stunning-cross-platform-applications-and-widgets-
with-the-most-powerful-gui-framework-1st-edition-eng-lee-zhi/

Download more ebook from https://ebookmeta.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!

Create GUI Applications with Python Qt5 The hands on


guide to making apps with Python 4th Edition Martin
Fitzpatrick

https://ebookmeta.com/product/create-gui-applications-with-
python-qt5-the-hands-on-guide-to-making-apps-with-python-4th-
edition-martin-fitzpatrick/

Beginning PyQt: A Hands-on Approach to GUI Programming


with PyQt6, 2nd Edition Joshua M Willman

https://ebookmeta.com/product/beginning-pyqt-a-hands-on-approach-
to-gui-programming-with-pyqt6-2nd-edition-joshua-m-willman/

Create GUI Applications with Python Qt6 The hands on


guide to making apps with Python pyside6 Edition
Martin Fitzpatrick

https://ebookmeta.com/product/create-gui-applications-with-
python-qt6-the-hands-on-guide-to-making-apps-with-python-
pyside6-edition-martin-fitzpatrick/

Chinese and Buddhist Philosophy in Early Twentieth


Century German Thought Eric S. Nelson

https://ebookmeta.com/product/chinese-and-buddhist-philosophy-in-
early-twentieth-century-german-thought-eric-s-nelson/
Voices of Drought The Politics of Music and Environment
in Northeastern Brazil Silvers

https://ebookmeta.com/product/voices-of-drought-the-politics-of-
music-and-environment-in-northeastern-brazil-silvers/

The Human Edge How curiosity and creativity are your


superpowers in the digital economy 1st Edition Greg
Orme

https://ebookmeta.com/product/the-human-edge-how-curiosity-and-
creativity-are-your-superpowers-in-the-digital-economy-1st-
edition-greg-orme/

Korea and the Fall of the Mongol Empire Alliance


Upheaval and the Rise of a New East Asian Order David
M. Robinson

https://ebookmeta.com/product/korea-and-the-fall-of-the-mongol-
empire-alliance-upheaval-and-the-rise-of-a-new-east-asian-order-
david-m-robinson/

The Boss Me Series: Complete Billionaire Boxed Set


Romance Books (1-3): (A Billioniare Steamy Romance
Series) 1st Edition Brooke Kinsley [Kinsley

https://ebookmeta.com/product/the-boss-me-series-complete-
billionaire-boxed-set-romance-books-1-3-a-billioniare-steamy-
romance-series-1st-edition-brooke-kinsley-kinsley/

PHP MySQL Novice to Ninja 7th Edition Tom Butler

https://ebookmeta.com/product/php-mysql-novice-to-ninja-7th-
edition-tom-butler/
Hadzic's Peripheral Nerve Blocks and Anatomy for
Ultrasound-Guided Regional Anesthesia 3rd Edition Admir
Hadzic

https://ebookmeta.com/product/hadzics-peripheral-nerve-blocks-
and-anatomy-for-ultrasound-guided-regional-anesthesia-3rd-
edition-admir-hadzic/
Hands-On GUI Programming with C++ and Qt5

Build stunning cross-platform applications and widgets with the most


powerful GUI framework

Lee Zhi Eng

BIRMINGHAM - MUMBAI
Hands-On GUI Programming
with C++ and Qt5
Copyright © 2018 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or
transmitted in any form or by any means, without the prior written permission of the
publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without
warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers
and distributors, will be held liable for any damages caused or alleged to have been caused
directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.

Commissioning Editor: Richa Tripathi


Acquisition Editor: Alok Dhuri
Content Development Editor: Lawrence Veigas
Technical Editor: Mehul Singh
Copy Editor: Safis Editing
Project Coordinator: Prajakta Naik
Proofreader: Safis Editing
Indexer: Pratik Shirodkar
Graphics: Jisha Chirayil
Production Coordinator: Nilesh Mohite

First published: April 2018

Production reference: 1260418

Published by Packt Publishing Ltd.


Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.

ISBN 978-1-78839-782-7

www.packtpub.com
mapt.io

Mapt is an online digital library that gives you full access to over
5,000 books and videos, as well as industry leading tools to help you
plan your personal development and advance your career. For more
information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical
eBooks and Videos from over 4,000 industry professionals

Improve your learning with Skill Plans built especially for you

Get a free eBook or video every month

Mapt is fully searchable

Copy and paste, print, and bookmark content


PacktPub.com
Did you know that Packt offers eBook versions of every book
published, with PDF and ePub files available? You can upgrade to the
eBook version at www.PacktPub.com and as a print book
customer, you are entitled to a discount on the eBook copy. Get in
touch with us at [email protected] for more details.

At www.PacktPub.com, you can also read a collection of free


technical articles, sign up for a range of free newsletters, and receive
exclusive discounts and offers on Packt books and eBooks.
Contributors
About the author
Lee Zhi Eng is a self-taught programmer who has worked as an
artist and programmer at several game studios before becoming a
part-time lecturer for 2 years at a university, teaching game
development subjects related to Unity and Unreal Engine.

He has not only taken part in various projects related to games,


interactive apps, and virtual reality, but has also participated in
multiple projects that are more oriented toward software and system
development. When he is not writing code, he enjoys traveling,
photography, and exploring new technologies.
About the reviewer
Nibedit Dey is a technopreneur with multidisciplinary technology
background. He holds a bachelor's degree in biomedical engineering
and a master's degree in digital design and embedded systems.
Before starting his entrepreneurial journey, he worked for L&T and
Tektronix for several years in different R&D roles. He has been using
Qt to build complex software products for the past 8 years.
Currently, he is a healthcare innovation fellow at IIT, Hyderabad, and
is involved in the development of a new medical device.
Packt is searching for authors
like you
If you're interested in becoming an author for Packt, please visit
authors.packtpub.com and apply today. We have worked with
thousands of developers and tech professionals, just like you, to help
them share their insight with the global tech community. You can
make a general application, apply for a specific hot topic that we are
recruiting an author for, or submit your own idea.
Table of Contents
Title Page
Copyright and Credits
Hands-On GUI Programming with C++ and
Qt5
Packt Upsell
Why subscribe?
PacktPub.com
Contributors
About the author
About the reviewer
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews

1. Introduction to Qt
What is Qt?
Why use Qt?
Discovering tools in Qt
Qt Designer
Qt Quick Designer
Downloading and installing Qt
Setting up the working environment
Running our first Hello World Qt program
Summary

2. Qt Widgets and Style Sheets


Introduction to Qt Designer
Basic Qt widgets
Qt Style Sheets
Summary

3. Database Connection
Introducing the MySQL database system
Setting up the MySQL database
SQL commands
SELECT
INSERT
UPDATE
DELETE
JOIN
Database connection in Qt
Creating our functional login page
Summary

4. Graphs and Charts


Types of charts and graphs in Qt
Line and spline charts
Bar charts
Pie charts
Polar charts
Area and scatter charts
Box-and-whiskers charts
Candlestick charts
Implementing charts and graphs
Creating the dashboard page
Summary

5. Item Views and Dialogs


Working with item view widgets
Creating our Qt Widgets application
Making our List Widget functional
Adding functionality to the Tree Widget
Finally, our Table Widget
Working with dialog boxes
Creating File Selection Dialogs
Image scaling and cropping
Summary

6. Integrating Web Content


Other documents randomly have
different content
Triste com’ á mesma noite,
Farto de dolor o peito,
Pídolle á Dios que me mate,
Porque xa vivir non quero.

Mais en tanto no me mata,


Castellanos qu’ aborreço,
Hei, para vergonza vosa,
Héivos de cantar xemendo:

¡Castellanos de Castilla,
Tratade ben ôs gallegos:
Cando van, van como rosas,
Cando vén, vén como negros!
LA GAITA GALLEGA

ECO NACIONAL
Á mi querido amigo D. Manuel Murguía.

Cuando la gaita gallega


El pobre gaitero toca,
No sé lo que me sucede
Que el llanto á mis ojos brota.
Ver me figuro á Galicia
Bella, pensativa y sola,
Como amada sin su amado,
Como reina sin corona.
Y aunque alegre danza entone
Y dance la turba loca,
La voz del grave instrumento
Suéname tan melancólica,
Á mi alma revela tantas
Desdichas, penas tan hondas,
Que no sé deciros
Si canta ó si llora.
II

Recuérdame aquellos cielos,


Y aquellas dulces auroras,
Y aquellas verdes campiñas,
Y el arrullo de sus tórtolas;
Y aquellos lagos, y aquellas
Montañas que al cielo tocan,
Todas llenas de perfumes,
Vestidas de flores todas,
Donde Dios abre su mano
Y sus tesoros agota;
Mas ¡ay!, como me recuerda
También que hay allí quien dobla,
En medio de la abundancia,
Al hambre la frente torva,
No acierto á deciros
Si canta ó si llora.

III

Suenan, y cruzan por mi espíritu


Puras, risueñas y hermosas
Las sombras de los cien puertos
De que Galicia es señora.
Y lentamente pasando,
Como ciudades que flotan,
Van sus cien naves soberbias
Al ronco son de las olas;
Mas ¡ay!, como en ellas veo,
Con el oro de sus costas,
Sus tiernos hijos desnudos
Que miran tristes á Europa,
Pidiendo su pan amargo
Á la América remota,
No acierto á deciros
Si canta ó si llora.

IV
¡Pobre Galicia!... Tus hijos
Huyen de ti ó te los roban,
Llenando de íntima pena
Tus entrañas amorosas.
Y como á parias malditos,
Y como á tribus de ilotas
Que llevasen en el rostro
Sello de infamia ó deshonra,
¡Ay!, la patria los olvida,
La patria los abandona,
Y la miseria y la muerte
En su hogar desierto moran.
Por eso aunque en son de fiesta
La gaita gallega se oiga,
No acierto á deciros
Si canta ó si llora.

V
¡Espera, Galicia, espera!
Lleva la cruz que te agobia,
Regando con sangre y lágrimas
Esa vía dolorosa.
¡Tendrás sed!... Hiel y vinagre
Te darán con mano pródiga,
Y con corona de espinas,
Cetro de caña por mofa;
Pero los tiempos se acercan,
Y cuando suene tu hora,
Feliz subirás y grande
Á la cumbre de la gloria.
Hoy si la gaita gallega
El pobre gaitero toca,
No acierto á deciros
Si canta ó si llora.

Ventura Ruiz Aguilera.


1860.
Á GAITA GALLEGA

RESPOSTA
Á ó eminente poeta D. Ventura Ruiz de Aguilera.

Cand’ este cantar, poeta,


Na lira xemendo entonas,
Non sei ó que por min pasa
Qu’ as lagrimiñas m’ afogan,
Qu’ ante de min cruzar vexo
Á virxen-mártir qu’ invocas,
C’ ôs pes cravados d’ espiñas
C’ âs mans cubertas de rosas.
En vano á gaita tocando
Unh’ alborada de groria
Sóns pó-los aires espalla
Que cân nas tembrantes ondas;
En vano baila contenta
Nas eiras á turba louca,
Qu’ aqueles sóns, tal m’ afrixen,
Cousas tan tristes me contan,
Qu’ eu podo decirche
Non canta, que chora.

II
Vexo contigo estos ceos,
Vexo estas brancas auroras,
Vexo estes campos froridos
Donde s’ arrullan as pombas,
Y estas montañas xigantes
Qu’ aló c’ âs nubes se tocan
Cubertas de verdes pinos
E de froliñas cheirosas;
Vexo esta terra bendita
Dond’ ó ben de Dios rebota
E dond’ anxiños hermosos
Tecen brillantes coroas;
Mas ¡ay!, como tamén vexo
Pasar macilentas sombras
Grilos de ferro arrastrando
Antre sorrisas de mofa,
Anque mimosa gaitiña
Toqu’ alborada de groria,
Eu podo decirche
Non canta, que chora.

III

Falas, y ó meu pensamento


Mira pasar temerosas
As sombras d’ eses cen portos
Qu’ ô pe d’ as ondiñas moran.
E pouco á pouco marchando
Fráxiles, tristes e soyas,
Vagar as naves soberbas
Aló nunha mar traidora.
Y ¡ay!, como nélas navegan
Os fillos d’ as nosas costas
Con rumbo á América infanda
Qu’ á morte c’ o pan lles dona,
Desnudos pedindo en vano
Á patria misericordia,
Anque contenta á gaitiña
O probe gaitero toca,
Eu podo decirche
Non canta, que chora.

IV
Probe Galicia, non debes
Chamarte nunca española,
Qu’ España de ti s’ olvida
Cando eres, ¡ay!, tan hermosa.
Cal si na infamia naceras,
Torpe, de ti s’ avergonza,
Y á nay qu’ un fillo despreça
Nay sin coraçón se noma.
Naide por que te levantes
Ch’ alarga á man bondadosa;
Naide os teus prantos enxuga,
Y homilde choras e choras.
Galicia, ti non tés patria,
Ti vives no mundo soya,
Y á prole fecunda tua
S’ espalla en errantes hordas,
Mentras trist’ e solitaria
Tendida na verde alfombra
O mar esperanzas pides,
De Dios á esperanza imploras.
Por eso anqu’ en son de festa
Alegre á gaitiña s’ oya,
Eu podo decirche
Non canta, que chora.

V
«Espera, Galicia, espera»
¡Cánto este grito consola!
Páguecho Dios, bon poeta,
Mais é unha esperanza louca;
Qu’ antes de qu’ os tempos cheguen
De dicha tan venturosa,
Antes que Galicia suba
C’ á cruz qu’ ó seu lombo agobia
Aquel difícil camiño
Qu’ ô pé d’ os abismos toca,
Quisáis cansada e sedenta,
Quisáis que d’ angustias morra.
Págueche Dios, bon poeta,
Esa esperanza de groria,
Que de teu peito surxindo,
Á virxen-mártir coroa,
Y esta á recompensa sea
D’ amargas penas tan fondas.
Páguech’ este cantar triste
Qu’ as nosas tristezas conta,
Que soyo ti..., ¡ti entre tantos!,
D’ as nosas magoas s’ acorda.
¡Dina voluntad d’ un xenio,
Alma pura e xenerosa!
E cando á gaita gallega
Aló nas Castillas oyas,
O teu coraçón pergunta,
Verás que che di en reposta
Qu’ a gaita gallega
Non canta, que chora.
XXIX

—Vente, rapasa,
Vente, meniña,
Vent’ á lavar
No pilón d’ á fontiña.

Vente, Minguiño,
Minguiño, vente,
Dóuche sinon
Pó-lo demo do dente.

¡Qu’ augua tan limpa!


¡Qué rica frescura!
Vent’ á lavar
Qu’ é un primor, criatura.

Válgame Dios,
Que si auguiña n’ houbera,
Lama este corpo
Mortal se volvera.

Vinde á lavarvos,
Andá lixeiriños,
A cara pirmeiro,
Dimpois os peïños.

¡Ay!, ¡qué meniña!


¡Qué nena preciosa!
Dempois de lavada
Parec’ unha rosa.

Y este meniño
Que teño no colo,
Dempois de lavado
Parec’ un repolo.

¡Ay!, ¡qué tan cuco!


¡Ay!, ¡qué santiño!
Ven ôs meus brazos
Dareich’ un biquiño.

¡Olliños de groria!
¡Cariña de meiga!
¡Apértame ben,
Coraçón de manteiga!

Corre, corre
A qu’ Antona te peite,
Corre, daráche
Unha cunca de leite.

Corre, corre
A teu pay, Mariquiña,
Que come cebola
Con pan e sardiña.

II
—¡Válgate Dios,
Qu’ inda os figos son duros!
¡Mais qué fartiña
En estando maduros!

Él e máis eu
Y á comadre d’ abaixo,
Hemos de ter
Qu’ alargar ó refaixo.


Rica figueira,
Que Dios te bendiga,
Qu’ ásme, abofé,
De fartar á barriga.

—¡Jey!, ó d’ os ovos
Que vás de camiño,
¿Cántas duciñas
Topache no niño?

—¡Unha no máis!
—¡No me teño c’ á risa!
Es’ ech’ un conto
Que vay par’ á misa.

Dam’ acá seis,


Qu’ un fricol che faría,
Qu’ ô mesmo rey
Qu’ envidiar lle daría.

Xa que non qués


No camiño che colla
Vento de vira,
C’ un saco de molla.
III

—Turra, turra,
¡Xan pó-la burra!
Mira que Pedro
A cadela ch’ apurra.

¡Ay!, desdichada
De min que á vexo,
Fincarch’ ó colmillo
No triste pelexo.

¡Diancre de Xan,
Que non corre nin tóa!
Ben haya, amén,
Quen os osos che roa.

¡Chúrras!, ¡chúrras!
¡Churriñas, chúrras!
Cas-qui-tó,
Qu’ escorrenta-las burras.

Pica, pica
Suriña, pica,
Léballe un gran
O teu fillo na bica.

Marcha can
A ladrar ô palleiro,
¡Seique ch’ agrada
O demoro do cheiro!

¡Baiche c’ o can,
Qu’ ó peixiño lle gusta!
Mais â teu dono
O diñeiro lle custa.

¡Gachi, gachi,
Que dencho de gato!
¡Cómo se farta
No prebe do prato!

¡Inda reventes,
Larpeiro rabudo!
¡Qu’ inda na gorxa
Ch’ aperten un nudo!

Truca, perico,
No gato rabelo
Hasta deixalo
Quedar sin un pelo

Qu’ eu, s’ outra vez


O camiño m’ atranca,
Ei de rompelle
No lombo unha tranca.

¡Malo d’ aquel
Que non sabe de misa,
Nin entra na igrexa
Nin gasta camisa!...

¡Ay!, ¡qué galiña


Saltou no valado;
Sey que quer vir
A comer de prestado!

Isca d’ ahí,
Galiña maldita,
Isca d’ ahí
Nô me mate-la pita.

Isca d’ ahí,
Galiña ladrona,
Isca d’ ahí
Pra câs tua dona.
XXX

Cando á luniña aparece


Y ó sol nos mares s’ esconde,
Todo é silencio nos campos,
Todo na ribeira dorme.
Quedan as veigas sin xente,
Sin ovelliñas os montes,
A fonte sin rosas vivas,
Os árbores sin cantores.
Medroso ó vento que pasa
Os pinos xigantes move,
Y a voz que levanta triste,
Outra máis triste responde.
Son as campanas que tocan,
Que tocan en sóns de morte,
Y ô coraçón din n’ olvides
Ós que para sempre dormen.
¡Qué triste! ¡Qué hora tan triste
Aquela en qu’ ó sol s’ esconde,
En qu’ as estrelliñas pálidas
Tímidamente relosen!
Aló as montañas confusas
D’ espesas niebras se croben,
Y á casa branca en qu’ él vive
En sombra espesa s’ envolve.
En vano miro e máis miro,
Qu’ os velos da negra noite
Entr’ ela y os meus olliños
Traidoramente se poñen.

—¿Qué fas ti mentras, meu ben?


Dime dónd’ estás, en dónde,
Que t’ aspero e nunca chegas,
Que te chamo e non respondes.
¿Morreches, meu queridiño?
¿O mar sin fondo tragoute?
¿Leváront’ as ondas feras
Ou perdécheste nos montes?
Vou perguntand’ ôs airiños,
Vou perguntand’ ôs pastores,
Ás verdes ondas pergunto
E ninguén, ¡ay!, me responde.
Os aires mudiños pasan,
Os pastoriños no m’ oyen,
Y as xordas ondas fervendo
Contr’ os penedos se rompen.
Mais ti non morreche, ingrato,
Nin te perdeches nos montes;
Ti, quisáis, mentras qu’ eu peno,
D’ os meus pesares te goces.
¡Coitada de min, coitada!
Qu’ este meu peitiño nobre
Foi para ti deble xunco
Qu’ ô menor vento se torce.
¡Y en recompensa ti olvidásme!
Dasme fel e dasme á morte...
¡Qu’ est’ é ó pago, desdichada,

You might also like