sudo apt-get install -y qt5-default
qmake -project
echo "QT += widgets" >> qt_example.pro
qmake
make
Last active
June 6, 2018 14:49
-
-
Save jadonk/db2cc4688c5277c84d19a6579e0dca86 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QtWidgets> | |
int main( int argc, char *argv[] ) | |
{ | |
QApplication myapp( argc, argv ); | |
QLabel *mylabel = new QLabel("Hello world"); | |
mylabel->show(); | |
return myapp.exec(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################################### | |
# Automatically generated by qmake (3.1) Wed Jun 6 04:52:28 2018 | |
###################################################################### | |
TEMPLATE = app | |
TARGET = qt_example | |
INCLUDEPATH += . | |
# The following define makes your compiler warn you if you use any | |
# feature of Qt which has been marked as deprecated (the exact warnings | |
# depend on your compiler). Please consult the documentation of the | |
# deprecated API in order to know how to port your code away from it. | |
DEFINES += QT_DEPRECATED_WARNINGS | |
# You can also make your code fail to compile if you use deprecated APIs. | |
# In order to do so, uncomment the following line. | |
# You can also select to disable deprecated APIs only up to a certain version of Qt. | |
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 | |
# Input | |
SOURCES += hello_qt.cpp | |
QT += widgets |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment