473,385 Members | 2,044 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

QPainter

Hello
using qt3 i do the follow for paint some line in a frame

gr = QPainter(self.frame3)
gr drawLine(30,10,30,490)
and the line is draw.

Whit qt4 :
gr = QtGui.QPainter(self.frame3)
#gr.setPen(QtGui.QPen(QtCore.Qt.black, 1, QtCore.Qt.SolidLine))
gr.drawLine(30,10,30,490)
and nothing is draw but i have no error

The frame is the same with the same dimension and relative dimension.

where is the error?

Regards

Luca

Jun 20 '07 #1
1 2145
On Wednesday 20 June 2007 4:44 pm, luca72 wrote:
Hello
using qt3 i do the follow for paint some line in a frame

gr = QPainter(self.frame3)
gr drawLine(30,10,30,490)
and the line is draw.

Whit qt4 :
gr = QtGui.QPainter(self.frame3)
#gr.setPen(QtGui.QPen(QtCore.Qt.black, 1, QtCore.Qt.SolidLine))
gr.drawLine(30,10,30,490)
and nothing is draw but i have no error

The frame is the same with the same dimension and relative dimension.

where is the error?
Impossible to tell with so little information. One guess is that Qt4 requires
you to paint from a reimplementation of paintEvent().

Post a small but complete example to the PyQt mailing list.

Phil
Jun 20 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Benjamin Sher | last post by:
Dear friends: I would appreciate your help in installing SIP with QT support so that I can then install PyQT. My reason is that I would like to install a number of KDE applications that...
3
by: Robert | last post by:
Planning to use python,PyQt and Postgresql for a up coming cross-platform app. What do you guys use for reports? thanks; Robert - slackware
10
by: Peter | last post by:
I want to draw some lines on a widget. This works ok, but when I want to redraw, the old lines are still there. How do I clear or refresh the widget, so I can draw a new set of lines? Code...
5
by: kaltter | last post by:
Hi, I'm trying to make an application using opengl i'm using all the standar functions very similar to some examples i've seen on the internet, but when compiling some error messages appear saying...
1
by: roN | last post by:
Hi, I can't start Evolution 2.2.1 anymore, I keep getting this error: reg@linux:~> evolution es menu class init adding hook target 'source' (evolution:9858): camel-WARNING **: Invalid root:...
10
by: Fabian Steiner | last post by:
Hello! I am currently working on an application where the user is able to create new worksheets and to delete existing ones. All of these worksheets have the same structure (--> template?), only...
5
by: druberego | last post by:
I read google and tried to find the solution myself. YES I do know that you can get undefined references if you: a) forget to implement the code for a prototype/header file item, or b) you forget...
0
by: jijiz | last post by:
Hi everyone, My english is quite poor... I prefer inform you about it... So i would like to draw some pictures (cubic, square, lines) into objects (QLabel), and instanciate those objects into a...
0
by: David Boddie | last post by:
On Mon Sep 17 09:29:43 CEST 2007, luca72 wrote: You should probably be painting on "self" instead of "self.frame". It may not be related to your problem, but why don't you store the picture...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.