I got an error Message:
unhandled AttributeError "imgLabel"
I think he can not find this Attribute, but i am not sure.
I have defined "imgLabel" in the <__init__(self, parent=None)> Class-Method.
Do i have to make a Class-Attribute to
call it from another Class-Method ?
What should be Class Att
At this moment i am trying the example:
http://doc.trolltech.com/4.4/widgets-imageviewer.html
But i have trouble to convert the class-method .
There is a Qt Method which is not listed in the Qt API
Library. It is named .
How should my PyQt4 Code looks like for this Class-Method?
I doesn't know
David Boddie schrieb:
On Tue, 10 Feb 2009 22:45:51 +0100, Markus Feldmann wrote:
i have an QScrollArea where i inserted a QLabel.
This QLabel includes an QImage.
I want to zoom/scale into this image.
How can i do this?
Try one of these approaches:
1. Keep the original image and show a
David Boddie schrieb:
It's not necessary to understand how to use resources initially, but you
will find them useful when you start wanting to run the program from within
different directories.
This is a really important thing, but maybe i can bypass this with some
python commands. :-)
As i unde
David Boddie schrieb:
import basicdrawing_rc
Note that you need to have this module to be able to show the image used
by the example. It is created by running pyrcc4 in the basicdrawing
directory like this:
pyrcc4 -o basicdrawing_rc.py basicdrawing.qrc
This causes all the resources declared
David Boddie schrieb:
Here, because you are using a QLabel to show the image, it should
automatically appear correctly in the QScrollArea.
(Aside: If you create your own custom widget (by subclassing QWidget), you
have to reimplement the sizeHint() method as well as the paintEvent() method
to ma
Hi All,
i have an QScrollArea where i inserted a QLabel.
This QLabel includes an QImage.
I want to zoom/scale into this image.
How can i do this?
Regards Markus
Here is a PART of my Code:
###
class ScrollArea(QScrollArea):
def __init_
I go it. :-)
I am not sure, but maybe i have to set a Widget in
the ScrollArea, and in this Widget i may paint?
Here is my Code:
##
mport sys
from PyQt4.QtGui import QMainWindow, QDockWidget, QPainter, QAction,
QScrollArea
I changed the class Qwidget --> QSrollArea and got the same Problem
as i have.
So i think that i can not paint in a scrollarea ???
###
import sys
from PyQt4 import QtCore, QtGui
import basicdrawing_rc
class RenderArea(QtGui.Q
To compare i post the example.
There are some commands in the example i didn't understand.
I do some notes in the Code !!!
###
import sys
from PyQt4 import QtCore, QtGui
import basicdrawing_rc
class RenderArea(QtGui.QWidget)
David Boddie schrieb:
On Tue Feb 10 15:02:13 GMT 2009, Markus Feldmann wrote:
I think my Problem is that i have to send an envent?
Yes, you need to make a paint event happen. You can do this by calling
the update() method on the widget you want to be updated.
As you wrote i changed some of
I got the follwing Messages:
QPainter::begin: Widget painting can only begin as a result of a paintEvent
QPainter::save: Painter not active
QPainter::restore: Unbalanced save/restore
QPainter::end: Painter not active, aborted
I can't find the soultion. Please help.
__
Mads Ipsen schrieb:
- Original Besked
Fra: Markus Feldmann
Til: pyqt@riverbankcomputing.com
Emne: [PyQt] Re: how to show interactive Picture
Dato: 09/02/09 23:58
Mads Ipsen schrieb:
> Could is be that you try to paint before the window is shown? You
need to
> cal
Mads Ipsen schrieb:
Could is be that you try to paint before the window is shown? You need to
call show() before you can start painting. The following snippet generates
an error similar to yours:
Hi,
This is not all of my Code. So there is a in my main source
code. This Source Code only shows
Hi All,
i am programming a MDI Application where a Window in the
workspace shall work as a Map Program. Therefore i want
to show a Picture which is parted in many small hexagons.
This hexagons can be selected with the mouse.
Ok, i started first to set up the picture, but got
trouble. Here are so
15 matches
Mail list logo