Showing posts with label Qt Creator Examples. Show all posts
Showing posts with label Qt Creator Examples. Show all posts

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.



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