Friday, July 17, 2020

Build your first 'Qt for MCUs' application


Qt for MCUs is a complete graphics framework and toolkit with everything you need to design, develop, and deploy GUIs on MCUs. Run your application on bare metal or a real-time operating system.

Join this tutorial to learn how to build your first MCU application.

More info: https://www.qt.io/product/develop-software-microcontrollers-mcu


Friday, October 30, 2015

Hello World Qt, hand made from Empty qmake Project

This video show how to create Empty qmake Project in Qt Creator, create .cpp and edit .pro to make a Hello World application.


main.cpp

#include <QApplication>
#include <QPushButton>

int main(int argc, char *argv[]){
    QApplication app(argc, argv);
    QPushButton qPushButton("Hello Qt");
    qPushButton.show();
    return app.exec();
}


You will be reported with error of:
QApplication: No such file or directory
QPushButton: No such file or directory

To fix it: Edit HelloQt.pro to add the code QT+=widgets.
QT+=widgets
SOURCES += \
    main.cpp


libGL error: core dri or dri2 extension not found and failed to load driver: vboxvideo

In case you install QtCreator on Ubuntu under VirtualBox, and QtCreator cannot run caused by:
libGL error: core dri or dri2 extension not found
libGL error: failed to load driver: vboxvideo

Try to close Ubuntu, disable 3D Acceleration of Setting > Display in VirtualBox, and restart Ubuntu again.


Wednesday, October 28, 2015

Chage Qt5 Example of Calendar to set today

The Qt Creator Examples: Qt5 Calendar preset date to 2014 January 1. By default, the date of Calendar is today.

To change the data of Qt Calendar Example, edit qml/main.qml, simple comment the code selectedDate: new Date(2014, 0, 1)




Monday, October 26, 2015

Qt Creator Examples - Qt Quick Controls Gallery


This example project demonstrates the various UI components provided by Qt Quick Controls.

error: qtquickcontrolsapplication.h: No such file or directory

If you try to build Qt Creator Examples and reported error of qtquickcontrolsapplication.h: No such file or directory.

Most probably you install Qt with sudo, the default install location is /opt, a user un-writable location. When you build Qt Creator Examples, you have to copy the project to another user writable location, it break the links and lost the shared directory.

May be you have to un-install Qt. Re-install to another user writable location, or re-install WITHOUT sudo (the default location is your HOME). Such that you need not copy the project when create examples.



How to uninstall Qt

To unstall Qt:

open terminal, go to the installed directory, run MaintenanceTools:

$ ./MaintenanceTool


Qt Creator Examples: Qt5 Calendar


The Calendar example displays a Calendar control and an events list for the selected date. It uses a C++ class to fetch the event details from an SQLite database. The example app uses a custom CalendarStyle to highlight the selected date and mark the dates that have events.


To set date to today: Chage Qt5 Example of Calendar to set today

Tuesday, May 20, 2014

Internet of Things and Qt

Qt 5.3 available now

Qt 5.3 is the latest version of Qt, the leading cross-platform application and UI software development framework. With Qt you can take your application natively to all major desktop, embedded or mobile platforms or create highly powerful modern embedded devices with alternative screens or remote controllers running on desktop or mobile platforms--Implement Internet-of-Things or Bring-Your-Own-Device with the same, one technology: Qt.

Know more: http://qt-project.org/qt5/qt53

Introducing Qt 5.3

Tuesday, May 13, 2014

Qt WebEngine with new features on multiple platforms

The video is presented by the Digia,Qt WebEngine team. The following video shows Qt WebEngine in action on multiple platforms. Some very exciting features shown in the video include WebRTC being used for video conferencing and WebGL and CSS animations running on embedded linux. Further it also shows HTML5 Video running on an off-the-shelf embedded device.

Qt WebEngine on Multiple Devices

Friday, March 14, 2014

Qt in Embedded World 2014

Qt Snapshots from Embedded World 2014 (Nuremberg, Germany), the largest embedded systems show in Europe.

Further information about the showcases presented in the video can be found from: http://qt.digia.com/Embedded-World/

Thursday, December 12, 2013

Qt 5.2 and Qt Creator 3.0 Released

Read Qt Blog:

A Book about Qt5

The entire collection of chapters covering Qt5 programming, written by Juergen Bocklage-Ryannel and Johan Thelin, is available here.

Monday, November 18, 2013

Example of QtQuick.Controls SpinBox

Example to implement QtQuick.Controls SpinBox with qml.

QtQuick.Controls SpinBox
example of QtQuick.Controls SpinBox

import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Window 2.0

ApplicationWindow {
    title: qsTr("qteveloper.blogspot.com")
    width: 400
    height: 350

    menuBar: MenuBar {
        Menu {
            title: qsTr("File")
            MenuItem {
                text: qsTr("Exit")
                onTriggered: Qt.quit();
            }
        }
    }

    Column{
        Label {
            id: label
        }

        SpinBox{
            id: spinbox1
            width: 100
            maximumValue: 100
            minimumValue: 0
            value: 50
            onValueChanged: label.text = "spinbox1: " + value
        }
        SpinBox{
            id: spinbox2
            width: 100
            maximumValue: 100
            minimumValue: 0
            value: 50
            stepSize: 5
            prefix: "prefix: "
            onValueChanged: label.text = "spinbox2: " + value
        }
        SpinBox{
            id: spinbox3
            width: 100
            maximumValue: 100
            minimumValue: 0
            value: 50
            stepSize: 10
            suffix: "-suffix"
            onValueChanged: label.text = "spinbox3: " + value
        }

    }
}

Sunday, November 17, 2013

QtQuick.Controls example, Slider.

qml example to implement QtQuick.Controls Slider.

QtQuick.Controls Slider
QtQuick.Controls Slider

import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Window 2.0

ApplicationWindow {
    title: qsTr("qteveloper.blogspot.com")
    width: 400
    height: 350

    menuBar: MenuBar {
        Menu {
            title: qsTr("File")
            MenuItem {
                text: qsTr("Exit")
                onTriggered: Qt.quit();
            }
        }
    }

    Column{

        Label {
            id: label
        }

        Slider{
            id: slider1
            maximumValue: 100
            minimumValue: 0
            value: 50
            onValueChanged: label.text = "slider1: " + value
        }
        Slider{
            id: slider2
            maximumValue: 100
            minimumValue: 0
            value: 50
            stepSize: 10
            onValueChanged: label.text = "slider2: " + value
        }
        Slider{
            id: slider3
            maximumValue: 100
            minimumValue: 0
            value: 50
            stepSize: 25
            orientation: Qt.Vertical
            onValueChanged: label.text = "slider3: " + value
        }
    }
}

Friday, November 15, 2013

Qt 5 on Windows ANGLE and OpenGL

Qt 5 on Windows can be configured to use either OpenGL drivers, or DirectX drivers through the ANGLE library. What you want depends on your use case. The Qt project offers binary installers for both variants.

Read more: http://qt-project.org/wiki/Qt-5-on-Windows-ANGLE-and-OpenGL