Ktam3874/pitx software guide – Kontron KTAM3874-pITX User Manual

Page 210

Advertising
background image

KTD-S0057-I

Page 206 Linux® Programming Examples (DebianTM)


KTAM3874/pITX Software Guide


void Dialog::showTime ()
{

QTime time = QTime::currentTime ();

QString text = time.toString ("hh:mm");

// realizes blinking ':' for seconds ticking

if (! (time.second () % 2))

text[2] = ' ';

ui->

lcdNumber

->display (text);

}


int main (int argc, char *argv[])
{

QApplication app (argc, argv);

Dialog *dialog = new Dialog;

dialog->show

();

return app.exec ();

}


If you run the program with user or root rights you will experience a surprise - the appearance differs
strongly between the modes (without

QtConfig

and with the standard theme

Adwaita

).

The use of QtConfig can minimize the differences. Load this tool on the target hardware with

sudo apt-get install qt4-qtconfig

After call of

qtconfig

you see for example the following screen:

Advertising
This manual is related to the following products: