====== Testing an Example Project with Qt Creator ====== After [[comfilepi:install_qt_creator:index|installing Qt Creator]] and the [[comfilepi:install_the_comfilepi_sdk:index|ComfilePi SDK]], you can run one of the many examples in the SDK. The following video illustrates the general procedure. {{ :comfilepi:test_an_example_project:qt_example.mp4??800x450 |}} The examples can also be run directly on the ComfilePi by browsing to an example in the ''/opt/Qt5.8/examples'' directory and running one of the executables. Note: Before executing, you may need to run ''chmod +x {executable_file}'' to change the mode of the file to //executable//. ===== Open Example project ===== In Qt Creator, go to //Examples//, and a large number of examples will be presented. {{ :comfilepi:test_an_example_project:examples.png?nolink |}} For this demonstration we will use the //Dashboard// example located in the ''{SDK_Installation_Folder}\Device\sysroot\opt\Qt5.8\examples\quickcontrols\extras\dashboard'' folder. Type //Dashboard// in the search box to filter the list of examples, and select the //Qt Quick Extras - Dashboard// example. {{ :comfilepi:test_an_example_project:dashboard.png?nolink |}} Ensure the //ComfilePi// kit is selected, and press the //Configure Project// button to initialize the project files. {{ :comfilepi:test_an_example_project:configure_project.png?nolink |}} ===== View Project's Source Code ===== To view the project's source code, choose the //Edit// icon from the left toolbar, and select a source file in the project tree. {{ :comfilepi:test_an_example_project:edit_code.png?nolink |}} ===== View the Project Designer ===== Choose the //Design// icon from the left toolbar to view a ''.qml'' file in the designer. {{ :comfilepi:test_an_example_project:designer.png?nolink |}} ===== Debugging the Project ===== Press the keyboard's F5 key, or select the //Start Debugging// icon from the bottom of the left toolbar to deploy the project to the ComfilePi, execute it, and debug it on the host PC. Be sure to [[comfilepi:install_the_comfilepi_sdk:index#configuring_the_device_properties|update the "Device" properties in Qt Creator]] with the correct IP address and user credentials so Qt Creator can connect and deploy files to the ComfilePi. {{ :comfilepi:test_an_example_project:debug_start.png?nolink |}} {{ :comfilepi:test_an_example_project:debugging.png?nolink |}} {{ :comfilepi:test_an_example_project:example_running.png?nolink |}} ===== Additional Information ===== To learn more about Qt Quick development, see [[http://doc.qt.io/qt-5/qtquick-index.html|Qt's official documentation]].