[PyQt] Re: SIP properties

2008-04-16 Thread Kevin Watters
For future reference, my forked SIP with auto-generated properties is here: http://github.com/kevinwatters/wxpy/tree/master Just use %SIPOptions (AutoProperties) There's also (as of this posting) an option to strip "wx" from the beginning of any PyNames. This hack is enabled with %SIPOptions (Ren

Re: [PyQt] Construct QVariant from object of user type

2008-04-16 Thread Matt Newell
On Wednesday 16 April 2008 14:18:26 Arve Knudsen wrote: > On Wed, Apr 16, 2008 at 11:33 AM, Phil Thompson > > <[EMAIL PROTECTED]> wrote: > > On Wednesday 16 April 2008, Arve Knudsen wrote: > > > Phil, any comment on this? > > > > > > Thanks, > > > Arve > > > > Unless you can use the ctor that

Re: [PyQt] Construct QVariant from object of user type

2008-04-16 Thread Arve Knudsen
On Wed, Apr 16, 2008 at 11:33 AM, Phil Thompson <[EMAIL PROTECTED]> wrote: > On Wednesday 16 April 2008, Arve Knudsen wrote: > > Phil, any comment on this? > > > > Thanks, > > Arve > > Unless you can use the ctor that takes a void* I don't see how you can expect > to extend the functionality

[PyQt] Help menu and own icon

2008-04-16 Thread Christoph Burgmer
My app kept showing the "icon-not-found" icon, so I started looking around how other apps handle this. pykdedocs has this following magic lines: > helpMenu = KHelpMenu (self, aboutData, False) > self.menuBar ().addMenu (helpMenu.menu ()) > self.aboutAction= helpMenu.ac

[PyQt] rendering svg

2008-04-16 Thread Niels Egberts
Hi, I am pretty new to qt4 and python (have have very limited experience with C++ and qt3). I have a QWidget that I am using as a gameboard. So I want to draw svg images on it (like chesspieces and such). I have got this now: def __init__(self, parent=None): > QtGui.QWidget.__init__(

[PyQt] QListWidget

2008-04-16 Thread Alan Warden
Hi, Is there a (easy) way of dragging and dropping text in a QListWidget.QtCopyAction and Qt.MoveAction don't appear to be mean't for use on the same (one) Widget) Regards ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputin

[PyQt] Re: Construct QVariant from object of user type

2008-04-16 Thread Akos Polster
I don't think you can construct a QVariant _of_ an arbitrary object, but you can store most objects in QVariants as pickled strings: a=[1,2,3,4] v=QtCore.QVariant(pickle.dumps(a)) pickle.loads(str(v.toString())) [1, 2, 3, 4] This may or may not be what you are looking for... ~ Akos. Arve

[PyQt] QTableView with link in table cell...

2008-04-16 Thread Dirk Wagener
Hi I want to have a QTableView with links to websites as the cell contents. If the user clicks on a link, the default system browser must open the link. How do I go about doing this? Returning html bla as the displayrole for the cell does not work. Kind regards Dirk -- Dirk Wagener <[E

Re: [PyQt] QT Designer for Custom Widgets.

2008-04-16 Thread Phil Thompson
On Wednesday 16 April 2008, objectref wrote: > Xmmm...i tried what you said, the PyQt examples > (examples/designer/plugins). When I click on "Launch", a message box > informs me that "This example will start Qt Designer when you click the OK > button..." but this never happens. It also says that a

RE: [PyQt] QT Designer for Custom Widgets.

2008-04-16 Thread objectref
Xmmm...i tried what you said, the PyQt examples (examples/designer/plugins). When I click on "Launch", a message box informs me that "This example will start Qt Designer when you click the OK button..." but this never happens. It also says that after that,PyQt examples are going to be found in thei

Re: [PyQt] QT Designer for Custom Widgets.

2008-04-16 Thread Ulrich Berning
objectref wrote: Hi, I am reading Mark Summerfields' "Rapid Gui Programming with Python and Qt". Until the chapter I am now, I saw that we can build a new custom widget by subclassing an existing one and adding our own stuff. All this by code. Can I achieve the same thing by using solely the Q

Re: [PyQt] problems with QTextBrowser

2008-04-16 Thread Dusan Zatkovsky
On Wed 16. April 2008 11:46:26 Aaron Digulla wrote: > Quoting Dusan Zatkovsky <[EMAIL PROTECTED]>: > > I have tried "print repr ( html )" and it prints strange charracters ( > > <\x00h\x00t\x00m\x00l\x00>\x00<\x00h ... ). Couldn't be problem there? > > Yup. The 0-byte (\x00) is the "end of text" ch

[PyQt] QT Designer for Custom Widgets.

2008-04-16 Thread objectref
Hi, I am reading Mark Summerfields' "Rapid Gui Programming with Python and Qt". Until the chapter I am now, I saw that we can build a new custom widget by subclassing an existing one and adding our own stuff. All this by code. Can I achieve the same thing by using solely the Qt Designer ?? I mean

Re: [PyQt] problems with QTextBrowser

2008-04-16 Thread Aaron Digulla
Quoting Dusan Zatkovsky <[EMAIL PROTECTED]>: I have tried "print repr ( html )" and it prints strange charracters ( <\x00h\x00t\x00m\x00l\x00>\x00<\x00h ... ). Couldn't be problem there? Yup. The 0-byte (\x00) is the "end of text" character. The zero bytes come from unicode. It seems that yo

Re: [PyQt] Construct QVariant from object of user type

2008-04-16 Thread Phil Thompson
On Wednesday 16 April 2008, Arve Knudsen wrote: > Phil, any comment on this? > > Thanks, > Arve Unless you can use the ctor that takes a void* I don't see how you can expect to extend the functionality of a C++ class from Python. Phil > On Mon, Apr 14, 2008 at 10:32 PM, Arve Knudsen <[EMAIL PRO

Re: [PyQt] problems with QTextBrowser

2008-04-16 Thread Dusan Zatkovsky
I see some progress with the problem, but it is still not what i am looking for. Here is my debug code: # decode base64 data html = utils.decB64 ( data ) print type ( html ) # prints "" print repr ( html ) # prints "'<\x00h\x00t\x00m\x00l\x00>\x00<\x00h\x00e\x00a blahblah..." # it seems to be

[PyQt] QImage with a trapezoid draw result

2008-04-16 Thread Sergi Blanch i Torné
Hi! I'm try to show an image on a widget but the image appears distorted. This widget is receiving images by events with a method where the dimensions has also to be sent: def eventReceived(self, EventSource, EventType, EventValue): self._imagedata = array.array('B',Even

Re: [PyQt] Construct QVariant from object of user type

2008-04-16 Thread Arve Knudsen
Phil, any comment on this? Thanks, Arve On Mon, Apr 14, 2008 at 10:32 PM, Arve Knudsen <[EMAIL PROTECTED]> wrote: > On 4/14/08, alteo_gange <[EMAIL PROTECTED]> wrote: > > Le lundi 14 avril 2008, Arve Knudsen a écrit : > > > > > How do I construct a QVariant of an object of a non-Qt class? > >

Re: [PyQt] problems with QTextBrowser

2008-04-16 Thread Dusan Zatkovsky
On Tue 15. April 2008 21:52:08 Aaron Digulla wrote: > I have no idea; the code looks good and should do what you expect. Some > tips to debug this: Query the textBrowser for its contents right after > setHtml() with getText() and getHtml(). After setHtml(), textbrowser returns QString with the sam