C++ Qt 07 - Basic Application and HTML Aware Widgets

Learn how to make a very basic application without using the designer and how widgets are HTML aware

Video tags:


Comments

Nice one but is it possible to run js too? thanks
Hello, I am using QT 5.8.0 (QT creator 4.2.1) My project file, QT += widgets SOURCES += \ main.cpp And main.cpp file, #include #include int main(int argc,char *argv[]) { QApplication app(argc, argv); QLabel *label = new QLabel("Hello world"); label->show(); return app.exec(); } When I run,it shows error C1004: unexpected end-of-file found.
Hello Brian, great tutorials.  For those running Qt 5.2 needs to use: QT += widgets TARGET = minimal SOURCES += \     main.cpp
Whoow... I didn't know Qt could use an html coding.
When i try to include the end i have error 1:00E:\giorg\Documents\QT\VoidRealms\7 Qt 07 - Basic Application and HTML Aware Widgets\minimal\main.cpp:1: error: C1083: Cannot open include file: 'QApplication': No such file or directory plz help
The web developer in me screamed at seeing a font tag :P
@Gunther why did you gunt my fries add QT += widgets in the .pro file to make it recognize the #include
Another note to add onto what Jonecir posted, if you're on Qt 5.2, you may need to generate a main window as well. Otherwise, you may get an error saying QApplication is not in the file or directory. Adding the mainwindow files (.h, .cpp, and .ui) should fix this
At 3:54, is it better to create the label as a QLabel object (instead of a QLabel pointer) since you are not going to delete it in the main? I know this memory leak is small here but in general is it better to create an object in the stack if we are not deleting it?
Thank you for your video.
@lauriejmusic this example is straight out of the "C++ GUI Programming with Qt 4" book, in which the author explains that he's not concerned about memory leaks because it's such a basic program, but never justifies the use of heap memory. In fact, if you create it in the stack, it *will* work and with the added benefit that the resources will be properly deallocated upon exit. So, well, no reason for pointers, really.
Thanks :)
Great video! How could a qt_intellisensewidget be created to automatically sense which standard #includes and header files are needed as the code is typed in? Thank you. c-8 .
It seems like you can do almost any html including paragraphs, links.
Link -_-
Since it's html aware will it accept css too?
Please make a calculator tutorial thanks!
How to open an html file by clicking on a pushbutton please help me
Hi, it doesnt work in QT 5.2 , Im using linux ubuntu 12.04  the error is : error: QApplication: No such file or directory, I tried the solution on different forums but it doesn't  work either. 

C++ Qt 08 - Horizontal and Vertical Layouts

Learn how to make horizontal and vertical layouts


Qt 5 Demo

The following is a quick tour of what is new in qt 5. it is an application written with qt quick, based on qt 5. the source\ncode is available from:the video i


QT Project 2: The Calculator Part 1: Main Buttons and User Interface

Teaching you how to get a basic user interface running, showing numbers on a line by pressing buttons and cleaning this line afterwards using a basic reset butt


Introduction to Qt C++ framework for Visual Studio

My introduction to qt for visual studio.the video shows you how to download qt for the version of visual studio that you have and find the add-in needed to inte


Java vs C++

become a professional web or mobile developer with the framework online boot camp from learntoprogram.earn 8 certifications as well as the confidence, competen


C++ Qt 06 - layouts, tabs and buddies

Learn how to rapidly and graphically set-up a simple dialog



C++ Qt 09 - QGridLayout

Learn how to layout widgets in a grid using the qgridlayout


Qt C++ 05 Real Time Plotting with QCustomPlot

Use a button on a gui to add points to a plot. a simple example of how to implement real time plotting in c++.


C++ Qt 13 - Resource Files

How to create and read from qt resource files that are compiled in your application


C++ Qt 15 - QPushButton

Learn how to use the qpushbutton widget


C++ Qt 81 - QGraphicsView and QGraphicsScene

Learn how to make complex image objects using the qgraphicsview


C++ Qt 99 - Static Library

Learn how to make static libs


Qt Tutorials For Beginners 15 - Qt Stylesheets and using HTML

Handling html c++ html qt qt html parser example qt richtext qt parse html qt rich text editor qlabel rich text qt html subset qt5 html searches related to qt h


Qt Tutorials For Beginners 18 - QAction, QMenu, QToolBar

Qaction class c++ - how to add a list of qactions to a qmenu and handle checkable qactions (menu items) with icons qt5 tutorial qactions qaction class referen


C++ Qt 07 - Basic Application and HTML Aware Widgets