Skip to content

Qt Examples

  • Home
  • Signals and Slots
  • Event Filter
  • About Me
  • Contact

QPainter Draw Line

19 February 2019 istanbul 9d Comments

Before to draw line on a qwidget, override the paintEventFunction: virtual void paintEvent(QPaintEvent* p) override; implement the function: void DrawApplication::paintEvent(QPaintEvent*…

Continue Reading →

Posted in: Kategorilendirilmemiş, QPainter Filed under: how to draw line, qpainter, qpainter draw line, qpainter line, qpen, qt, qt mouseMove example, qt paintevent

QCombobox Signals And Slots

23 September 2018 istanbul

QCombobox has 8 signals. void activated(int index) void activated(const QString &text) void currentIndexChanged(int index) void currentIndexChanged(const QString &text) void currentTextChanged(const…

Continue Reading →

Posted in: Signal And Slots

Key Release Event

istanbul

For get key events in event filter, this function must be called in class overrided event filter function before: this->installEventFilter(this);…

Continue Reading →

Posted in: Key Events Filed under: key release example, qkey event release, qkey event release example, qt examples, qt key events, qt key release

Key Press Event

istanbul

For get key events in event filter, this function must be called in class overrided event filter function before: this->installEventFilter(this);…

Continue Reading →

Posted in: Key Events

Install The Mouse Event

istanbul

Mouse events are signals came from qobject when the user send an event by mouse. Forex: click, move, press. vb.…

Continue Reading →

Posted in: Mouse Events Filed under: eventFilter member, eventFilter override, evetnFilter, installEventFilter, mouseEvents, mouseMoveEvent, QMouseEvent

Start To Signals And Slots

istanbul

Signals and slots are used to connect between an event from gui and a function. In other words, you can…

Continue Reading →

Posted in: Signal And Slots

Mouse Move Example

istanbul

After to install event filter, we can get first mouseMoveEvent. My example is moving a QLabel in a QWidget by…

Continue Reading →

Posted in: Mouse Events Filed under: MouseMove, mouseMoveEvent, QLabel, QMouse, QMouseMove, qt, qt mouseMove example

Mouse Move Without Mouse Pressed

istanbul

If you want to get mouseMove event without mousePress, you must call this function on class you override eventFilter before:…

Continue Reading →

Posted in: Mouse Events Filed under: mouseEvent, MouseMove, without pressed qt

Mouse Press-Release Event

istanbul

After the install events with this function: installEventFilter(this); we can get the mouse press event like this example: bool ExampleApplication::eventFilter(QObject…

Continue Reading →

Posted in: Mouse Events Filed under: qt mouse event, qt mouse event example, qt mouse press, qt mouse release example, qt mousepress

Mouse Buttons on Mouse Events

istanbul

You can get mouse buttons like this example: bool ExampleApplication::eventFilter(QObject *object, QEvent *ev) { if (ev->type() == QEvent::MouseButtonPress) { QMouseEvent*…

Continue Reading →

Posted in: Mouse Events


New Added

  • QPainter Draw Line
  • QCombobox Signals And Slots
  • Key Release Event

Last Comments

  • RaymondLogue on QPainter Draw Line
  • GeorgeCet on QPainter Draw Line
  • JosephvOf on QPainter Draw Line

Archive

  • February 2019
  • September 2018
Copyright © 2022 Qt Examples — Escapade WordPress theme by GoDaddy