and why not ?
Check this code..
#include <QApplication>
#include <QLabel>
#include <QMainWindow>
{
public:
};
{
setCursor(Qt::CrossCursor);
}
{
setCursor(Qt::ArrowCursor);
}
int main (int argc, char *argv[])
{
CLabel label;
window.setCentralWidget(&label);
window.show();
return app.exec();
}
#include <QApplication>
#include <QLabel>
#include <QMainWindow>
class CLabel :public QLabel
{
public:
void mousePressEvent ( QMouseEvent * event );
void mouseReleaseEvent ( QMouseEvent * event );
};
void CLabel::mousePressEvent(QMouseEvent * event )
{
setCursor(Qt::CrossCursor);
}
void CLabel::mouseReleaseEvent(QMouseEvent * event )
{
setCursor(Qt::ArrowCursor);
}
int main (int argc, char *argv[])
{
QApplication app(argc,argv);
QMainWindow window;
CLabel label;
window.setCentralWidget(&label);
window.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
hope this helps
Bookmarks