Hi JimDaniel,
I have tried using your example but why do I get errors like this?
src\blinkingicon.cpp:4: error: new types may not be defined in a return type
src\blinkingicon.cpp:4: note: (perhaps a semicolon is missing after the definition of `BlinkingIcon')
src\blinkingicon.cpp:4: error: return type specification for constructor invalid
src\blinkingicon.cpp:10:35: warning: unknown escape sequence '\H'
mingw32-make[1]: *** [build\host\blinkingicon.o] Error 1
mingw32-make: *** [release] Error 2
src\blinkingicon.cpp:4: error: new types may not be defined in a return type
src\blinkingicon.cpp:4: note: (perhaps a semicolon is missing after the definition of `BlinkingIcon')
src\blinkingicon.cpp:4: error: return type specification for constructor invalid
src\blinkingicon.cpp:10:35: warning: unknown escape sequence '\H'
mingw32-make[1]: *** [build\host\blinkingicon.o] Error 1
mingw32-make: *** [release] Error 2
To copy to clipboard, switch view to plain text mode
The actual code i used is exactly the same as what you have given me, only difference is just that i split it into a .h and a .cpp... like this...
#ifndef __BLINKINGICON_H__
#define __BLINKINGICON_H__
#include <QWidget>
#include <QLabel>
class BlinkingIcon
: public QWidget{
Q_OBJECT
public:
BlinkingIcon
(QWidget * parent
= 0);
virtual ~BlinkingIcon();
private:
}
#endif // __BLINKINGICON_H__
#ifndef __BLINKINGICON_H__
#define __BLINKINGICON_H__
#include <QWidget>
#include <QLabel>
class BlinkingIcon : public QWidget
{
Q_OBJECT
public:
BlinkingIcon(QWidget * parent = 0);
virtual ~BlinkingIcon();
private:
QLabel * display_image;
}
#endif // __BLINKINGICON_H__
To copy to clipboard, switch view to plain text mode
#include "blinkingicon.h"
BlinkingIcon
::BlinkingIcon(QWidget * parent
) {
this->setWindowTitle(tr("My Blinking Icon"));
this->resize(200, 200);
display_image
= new QLabel(this);
display_image
->setPixmap
(QPixmap("C:\HmiProject\test\nyjc.bmp"));
display_image->adjustSize();
}
BlinkingIcon::~BlinkingIcon(){}
#include "blinkingicon.h"
BlinkingIcon::BlinkingIcon(QWidget * parent)
: QWidget(parent)
{
this->setWindowTitle(tr("My Blinking Icon"));
this->resize(200, 200);
display_image = new QLabel(this);
display_image->setPixmap(QPixmap("C:\HmiProject\test\nyjc.bmp"));
display_image->adjustSize();
}
BlinkingIcon::~BlinkingIcon(){}
To copy to clipboard, switch view to plain text mode
Once again, thanks for your patient help given. 
Hi wysota,
pardon me for my ignorance, but what does it mean by "The main difference is that a tristate QCheckBox has an indeterminate state." from the website? Is the example using an existing class QCheckBox, and giving it more functions to act as an indicator? the code... does it mean that the QCheckBox named indicator has a function indeterminate
ressed? I am having difficultity understanding the codes...
Can you explain briefly?
image: url(:/images/checkbox_indeterminate_pressed.png);
}
QCheckBox::indicator:indeterminate:pressed {
image: url(:/images/checkbox_indeterminate_pressed.png);
}
To copy to clipboard, switch view to plain text mode
Thanks!!
Bookmarks