Questions tagged [paintevent]

An event that is triggered when a GUI component needs to be repainted

A PaintEvent is an event that is triggered when a GUI component needs to be repainted. This is usually a result of a change to the underlying data behind the GUI component, so the GUI display needs to be repainted to reflect the change.

154 questions
0
votes
0 answers

TextRendering in panel only works when it's behind a label

I'm using TextRenderingHint.AntiAliasGridFit to render my text, because my text looks very bad when I don't. But for some strange reason the text only renders fine when its behind a label (transparant back color). So I paint the text in a panel and…
brent
  • 363
  • 2
  • 4
  • 12
0
votes
1 answer

How to speed up QPainter drawpoint();?

I want to draw many points by drawPoint(). It's possible, but too slow when call repaint() or update(). Normally I'm draw more than 1,000,000 points. What shoud I do?
KKANGJI
  • 1
  • 1
0
votes
1 answer

controlling paintGL method - How to decide what to paint?

I want to control the paintGL method by a keypress-event. The aim is show an additional point by pushing return. In other words: I have painted a nice background scene and now i want to push return (in a lineEdit) and there appears a red point in…
0
votes
1 answer

PaintEvent in Qt painting all widgets the same for each instance of the class

I have a class called MotionVectorDisplay which inherits from QWidget and I override the paintevent, what I do with this class is draw motion vectors for a pariticular macroblock which is 16x16 in size and there are multiple of these macroblocks in…
David Tr
  • 151
  • 2
  • 9
0
votes
3 answers

Using Bitmap in Bouncing Balls

I have a WinForm application 'Bouncing Balls' , and I need to paint the balls on a bitmap and present the bitmap on this form. I have a plusButton that adds new ball, and i'm saving each new ball in a list. Now, the Form_Paint method is telling…
Elior
  • 3,178
  • 6
  • 37
  • 67
0
votes
1 answer

How to modify QCombobox current item using PaintEvent() in Qt

I have a Combobox which has 3 items i.e. Item 1, Item 2 and item 3. I added these 3 items in .ui file and also added an image each for all using a resource file. Now when I am running the application, it shows the first item in combobox along with a…
Gojira
  • 171
  • 4
  • 14
0
votes
2 answers

How to display multiple images on user command?

I need to be able to display a group of images after the user presses a menu on the Gui. I have been trying to use the following code. private void imagePalleteToolStripMenuItem_Click(object sender, EventArgs e) { List Files =…
James Thompson
  • 245
  • 1
  • 6
  • 13
0
votes
1 answer

Resize after paintEvent generated content

How can I resize, automatically, any widget, to the paintEvent's method generated content dimensions?
andreihondrari
  • 5,743
  • 5
  • 30
  • 59
0
votes
1 answer

How to stop the background from repeating in a QpaintEvent

I have a paintEvent and I'm adding the background everytime I paint something, the problem is that I need the image to stop repeating. For example if my background image is 20pixels x 20 pixels, and my paint area is 40pixels x 40pixels, the…
acerqueiro
  • 29
  • 5
0
votes
2 answers

Override widget 's paint event within MainWindow

I have a widget container I wish to manually paint. However, it is located within my GUI's MainWindow class. Is there any way I can register on the paint event for a specific QWidget, so my own function will be called ?
dror
  • 3,759
  • 6
  • 31
  • 45
0
votes
3 answers

Qt - creating QPainter

I'm trying to rewrite method paintEvent in my programm and change it. void MainWindow::paintEvent(QPaintEvent *event) { QRegion reg = this->bgPixmapHandle->rect(); QPainter painter(this); painter.setClipRegion(reg); …
Max Frai
  • 61,946
  • 78
  • 197
  • 306
-1
votes
2 answers

How to make Triangle obect in Windows Form?

I want to draw/make a triangle graphic that will appear right after when I run the program but I can't figure out the right command. Here's the command I use to make a rectangle object. private void Form1_Paint(object sender, PaintEventArgs e) {…
-1
votes
1 answer

Show tooltip at mouse position and show legend on top-right corner

The following toy problem show two tabs, each tab contains a QGridLayout, which has a ScrollArea on one of the cells, which in turn contains a customized QLabel (MyLabel). When the user moves his mouse on the customzied QLabel, a tooltip shows up…
sofname
  • 429
  • 1
  • 5
  • 20
-1
votes
2 answers

PyQT Painter drawing Polygons

In my QT application I'm drawing lots of polygons like this: I'm animating these, so some polygons will receive a new color. This animation runs 4-5 times per second. However, calling the paintEvent() of the Qt.Painter() 4-5 times/second redraws ALL…
David
  • 1,084
  • 12
  • 36
-1
votes
1 answer

call paintevent on my own in other class in qt c++

I am new to qt and am doing a Red black tree visualization using qt c++. i have created node structure using Qpaint and im ready with basic data structure tree code, the only problem is the updation of paint event coz i want to call paint event…
1 2 3
10
11