Qt 5.10 Book Examples
chapter25
CustomWidget
CustomWidget.h
Go to the documentation of this file.
1
// ======================================================================
2
// CustomWidget.h
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
#pragma once
12
13
#include <QFrame>
14
15
// ======================================================================
16
class
CustomWidget
:
public
QFrame {
17
Q_OBJECT
18
protected
:
19
int
m_nProgress
;
20
21
virtual
void
paintEvent
(QPaintEvent*);
22
23
public
:
24
CustomWidget
(QWidget* pwgt = 0);
25
26
virtual
QSize
sizeHint
()
const
;
27
28
signals:
29
void
progressChanged
(
int
);
30
31
public
slots:
32
void
slotSetProgress
(
int
n);
33
};
CustomWidget
Definition:
CustomWidget.h:16
CustomWidget::m_nProgress
int m_nProgress
Definition:
CustomWidget.h:19
CustomWidget::slotSetProgress
void slotSetProgress(int n)
Definition:
CustomWidget.cpp:46
CustomWidget::progressChanged
void progressChanged(int)
CustomWidget::paintEvent
virtual void paintEvent(QPaintEvent *)
Definition:
CustomWidget.cpp:25
CustomWidget::sizeHint
virtual QSize sizeHint() const
Definition:
CustomWidget.cpp:54
CustomWidget::CustomWidget
CustomWidget(QWidget *pwgt=0)
Definition:
CustomWidget.cpp:15
Generated by
1.8.14