You are on page 1of 2

#include <stdio.h> #include <stdlib.h> #include <QApplication> #include <QLabel> #include <QWidget> /* #include <bcm_host.h> #include "interface/vchi/vchi.

h" #include "interface/vchiq_arm/vchiq_if.h" #include #include #include #include #include "interface/vmcs_host/vc_dispmanx.h" "interface/vmcs_host/vc_tvservice.h" "interface/vmcs_host/vc_cec.h" "interface/vmcs_host/vc_cecservice.h" "interface/vmcs_host/vcgencmd.h"

static void tvservice_init(); */ int main(int argc, char *argv[ ]) { // printf("Calling tvservice_init\n"); // tvservice_init(); printf("Creating app\n"); QApplication app(argc, argv); printf("Creating hello label\n"); QLabel hello("<center>Welcome to my first WikiHow Qt program</center>"); printf("Setting window title\n"); hello.setWindowTitle("My First WikiHow Qt Program"); printf("Resizing ...\n"); hello.resize(400, 400); printf("Showing ...\n"); hello.show(); printf("Executing ...\n"); return app.exec(); } /* void tvservice_init() { VCHI_INSTANCE_T vchi_instance; VCHI_CONNECTION_T *vchi_connections; // initialise bcm_host printf("Calling bcm_host_init ... "); bcm_host_init(); printf("Done!\n"); 1

// initialise vcos/vchi printf("Calling vcos_init ... "); vcos_init(); if (vchi_initialise(&vchi_instance) != VCHIQ_SUCCESS) { fprintf(stderr, "failed to open vchiq instance\n"); exit(-2); } printf("Done!\n"); // create a vchi connection printf("Calling vchi_connect ... "); if ( vchi_connect( NULL, 0, vchi_instance ) != 0) { fprintf(stderr, "failed to connect to VCHI\n"); exit(-3); } printf("Done!\n"); // connect to tvservice printf("Calling vc_vchi_tv_init ... "); if ( vc_vchi_tv_init( vchi_instance, &vchi_connections, 1) != 0) { fprintf(stderr, "failed to connect to tvservice\n"); exit(-4); } printf("Done!\n"); } */