qpainter Questions
1
Solved
This is my first time using Qt and I have to make a MSPaint equivalent with Qt. I am however having trouble with painting my lines. I can currently draw a line by clicking somewhere on the screen a...
1
Solved
As a follow up of Qt load indicator by animated image (aka preloader) or alternative? I try to paint inside a QTableView. But when I initialize the QPainter I get the following warnings.
QWidget::...
Leftwich asked 18/9, 2015 at 13:28
1
Solved
Code for the beginning:
QColor yellow("#f0d048");
Qt::BrushStyle style = Qt::SolidPattern;
QBrush brush(yellow, style);
painter.setBrush(brush);
painter.drawEllipse(10,10,10,10);
Everytime I do ...
Skepticism asked 30/6, 2015 at 15:20
1
Solved
This question is further development of this post and is different, though may seem similar as this one.
I am trying to reimplement QHeaderView::paintSection, so that the background returned from ...
Ladysmith asked 15/6, 2015 at 14:5
3
Is there any way to draw an image on QPainter center aligned? I see QPainter::drawText gives us this provision but drawImage does not. I have one source rect, target rect and an image. when the sou...
2
Solved
I'm trying to develop a custom QProgressBar that will look like the following image :
I created a class that extends QProgressBar and implemented the paintEvent() :
void CircularProgressBar::pa...
Interlocutor asked 30/4, 2014 at 18:3
3
Solved
I am drawing a line using QPainterPath between two points as follows:
QPainterPath line;
line.moveTo(start_p);
line.lineTo(end_p);
QPen paintpen(Qt::black);
paintpen.setWidth(1);
painter->setR...
Nato asked 2/10, 2014 at 7:54
5
Solved
1
Solved
I am trying to build a arc with some text. I am able to create the arc and I can place the text along with curve. But so far I cant find a way rotate text perpendicular to the curve.
Here is the c...
3
Solved
I am trying to draw line.
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
QPainter painter(&w);
painter.setPen(QPen(Qt::black, 12, Qt::DashDotLine,...
3
Solved
4.7 and like to overlay two images on a qgraphicsview. The image on top shall be semi-transparent to allow to see through it. Initially both images are fully opaque. I expected some function for se...
Audwen asked 13/11, 2010 at 13:12
2
Hi I am developing a blackberry10 app. Inside the app I have two images and I just need to merge these two images into a single image. There is no function in Cascades to combine them. When I...
3
Solved
i'm having difficulties implementing custom widget rendering in a QListView.
I currently have a QListView displaying my custom model called PlayQueue based on QAbstractListModel.
This is working f...
Spiritism asked 23/6, 2011 at 10:50
3
Solved
I'm using a QPainter to get some graphics on a window. Unfortunately every time the paintEvent() function is called, the whole window is cleared. How can I draw without clearing? I.e. how do I leav...
Saltzman asked 29/10, 2009 at 15:24
2
I'm a newbie to Qt/Embedded. I want to use QPainter to draw stuff on a QPixmap, which will be added to QGraphicsScene. Here is my code. But it does not show the drawings on the pixmap. It shows onl...
Craven asked 26/7, 2013 at 18:47
2
I have a list of points. For example, points = [[160, 75], [115, 567]].
How to draw a line in PyQt4, so it would be something like this:
Thanks in advance.
EDIT: For the record, I'm trying to i...
1
Solved
I have a question about drawing specific arc on a scene. I have this information about arc:
Starting Koordinates,
Start Angle,
End Angle ,
Radius.
But I can't use them efficently with QPainter. ...
Underglaze asked 11/1, 2013 at 13:25
5
Solved
How would I go about drawing a rectangle?
I have tried two different ways;
void MyWidget::paintEvent(QPaintEvent *)
{
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing);
pa...
1
Solved
I have a PyQt4 program with widgets whose content redraws very slowly (it's ok, because of my tasks). And when I trying to resize those widgets, program is trying to redraw a lot of times while mou...
Dachy asked 25/11, 2012 at 15:18
2
Solved
How can I draw a shape like a tear? I need to draw without using more than one shape (an ellipse and a polygon) because QPen will draw for each shape. I need to join shapes to create a new one, or ...
1
In my application, I paint a street map using QPainter on a widget
made by QPainterPaths that contain precalculated paths to be drawn
the widget is currently a QWidget, not a QGLWidget, but this ...
1
Solved
I'm trying to animate a polyline (it have to act like a wave). I've tried this way:
from PySide.QtCore import *
from PySide.QtGui import *
import sys, time
class Test(QMainWindow):
def __init__(...
1
Solved
I have QPainterPath. I need to find y coordinate of QPainterPath by x.
I found intersected() method in QPainterPath. So, I created new QPainterPath, which is line from left to right edge of my pat...
Witless asked 22/2, 2012 at 11:12
2
Solved
I use QPainter::setRenderHint(QPainter::Antialiasing, true) to tell Qt that I want it to antialias any drawing I do (in this case, text drawn with drawText()).
This works fine and the text looks g...
Cumulation asked 3/11, 2011 at 13:28
2
I need to convert an Raw image buffer into a jpg image buffer.
At the moment, I do this operation in the following way:
QImage tmpImage
= QImage(rawImgBuffer, img_width, img_height, image.forma...
© 2022 - 2024 — McMap. All rights reserved.