Qt 5.10 Book Examples
main.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // main.cpp
3 // ======================================================================
4 // This file is a part of the book
5 // "Qt 5.10 Professional programming with C++"
6 // http://qt-book.com
7 // ======================================================================
8 // Copyright (c) 2017 by Max Schlee
9 // ======================================================================
10 
11 #include <QtWidgets>
12 #include "MouseFilter.h"
13 
14 // ----------------------------------------------------------------------
15 int main (int argc, char** argv)
16 {
17  QApplication app(argc, argv);
18 
19  QLineEdit txt("QLineEdit");
20  txt.installEventFilter(new MouseFilter(&txt));
21  txt.show();
22 
23  QLabel lbl("QLabel");
24  lbl.installEventFilter(new MouseFilter(&lbl));
25  lbl.show();
26 
27  QPushButton cmd("QPushButton");
28  cmd.installEventFilter(new MouseFilter(&cmd));
29  cmd.show();
30 
31  return app.exec();
32 }
QLabel * lbl(const QPainter::CompositionMode &mode)
Definition: main.cpp:14
int main(int argc, char **argv)
Definition: main.cpp:15