Author Topic: QSplitter missing in PyQt on the Zaurus  (Read 8382 times)

zenyatta

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
QSplitter missing in PyQt on the Zaurus
« on: June 30, 2004, 05:19:31 am »
Hi all,

The following Python script runs fine on the big box but fails on the Z, saying name 'QSplitter' is not defined:
Code: [Select]
#!/usr/bin/env python
import sys
from qt import *
app=QApplication(sys.argv)
split=QSplitter(Qt.Vertical, None)
label1=QLabel(split)
label1.setText("Test 1")
label2=QLabel(split)
label2.setText("Test 2")
split.showMaximized()
app.setMainWidget(split)
app.exec_loop()
Further, grep QSplitter `ipkg files python-pyqt` returns nothing - so the class isn't even mentioned in the Zaurus implementation. The Python packages I'm using come from the 3.3.6-pre1 feed.

Given that QSplitter is such a basic piece of UI I'm quite puzzled as to why it is absent. I can work around this limitation for now, fortunately, but someday I may well need a split pane so it's quite discomforting to see it missing. Is it perhaps there and I'm just looking in the wrong place? Has it been deprecated & replaced by something else? Can anyone provide an explanation? Any advice appreciated.

z.
« Last Edit: June 30, 2004, 05:23:33 am by zenyatta »
SL-5500, 256MB Kingston CF card, 128MB EDGE SD card, Thomson HED-155 headphones
OpenZaurus 3.5.3 / Opie (kernel 64-0)

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
QSplitter missing in PyQt on the Zaurus
« Reply #1 on: June 30, 2004, 06:01:51 am »
Qt/Embedded is based on features which you can enable or disable in a particular build. One of Sharps less bright decisions was to exclude the Splitter out of their version of libqte2 hence it isn't available from PyQt.

If it wasn't for compatibility, we would've reenabled the Splitter (which we consider an important UI element - especially for tiny displays) already. We will most certainly do it in Opie 2.
« Last Edit: June 30, 2004, 06:02:18 am by Mickeyl »
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

zenyatta

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
QSplitter missing in PyQt on the Zaurus
« Reply #2 on: June 30, 2004, 06:41:13 am »
Thanks for the clarification. I've since discovered that grep QSplitter /opt/QtPalmtop/lib/libqte.so.2 also yields nothing. I started researching Qtopia docs looking for a clue; your reply saved me a lot of time.

z.
SL-5500, 256MB Kingston CF card, 128MB EDGE SD card, Thomson HED-155 headphones
OpenZaurus 3.5.3 / Opie (kernel 64-0)

zenyatta

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
QSplitter missing in PyQt on the Zaurus
« Reply #3 on: July 03, 2004, 06:00:53 pm »
I've discovered another omission: the QDragObject class does exist but all versions of the drag() method seem to be missing. They throw AttributeErrors in Python and grep drag libqte2.so.2 indicates that the class has source() and target() methods but no drag() - as far as I can tell.

I did find a list of Qtopia limitations on the Trolltech web site but it doesn't say anything about QDragObject. Pretty puzzling if you ask me. Does anyone have experience with QDragObject or QTextDrag under Qtopia?

z.
« Last Edit: July 03, 2004, 06:02:00 pm by zenyatta »
SL-5500, 256MB Kingston CF card, 128MB EDGE SD card, Thomson HED-155 headphones
OpenZaurus 3.5.3 / Opie (kernel 64-0)

zenyatta

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
QSplitter missing in PyQt on the Zaurus
« Reply #4 on: July 03, 2004, 06:04:40 pm »
OK, the Qtopia Overview says:
Quote
The modules removed from Qt due to their large size, speed or because they do not belong or are not necessary on an embedded device. For some of the modules, a description is provided if it is not obvious why this was left out of the Qt/Embedded offering for Qtopia.
It then lists drag and drop among those modules like so:
Quote
UI:  QTextCodec modules, drag and drop, free type fonts, extra desktop styles (i.e. Motif) were replaced by Qtopia style plugins
I conclude that drag & drop is not available in Qtopia. Can anyone confirm this?

In any case, the semi-complete QTextDrag implementation has just cost me quite a lot of time. Qtopia docs say if you're using whatever's not supposed to be available you'll get a compile error. How come, then, that PyQt compiles and produces this (qt.py)?:
Code: [Select]
class QTextDrag(QDragObject):
        def __init__(self,*args):
                libqtc.sipCallCtor(123,self,args)
Is this an Opie-specific libqte2 with a half-baked QDragObject?

z.
« Last Edit: July 03, 2004, 06:34:52 pm by zenyatta »
SL-5500, 256MB Kingston CF card, 128MB EDGE SD card, Thomson HED-155 headphones
OpenZaurus 3.5.3 / Opie (kernel 64-0)

Mickeyl

  • Hero Member
  • *****
  • Posts: 1495
    • View Profile
    • http://www.Vanille.de
QSplitter missing in PyQt on the Zaurus
« Reply #5 on: July 03, 2004, 07:33:57 pm »
No idea offhand. From our qte-config.h it seems drag and drop is completely disabled. Could be a bug in the sip features file we use.
Cheers,

Michael 'Mickey' Lauer | Embedded Linux Freelancer | www.Vanille-Media.de
Consider donating, if you like the software I contribute to.

ntrolls

  • Newbie
  • *
  • Posts: 22
    • View Profile
QSplitter missing in PyQt on the Zaurus
« Reply #6 on: September 03, 2006, 07:19:43 am »
I've been trying to teach myself programming in Python/PyQt, and found out that QSplitter was missing from the Qtopia in Zaurus.

However, other applications like Ko/Pi and TreeExplorer Qt use the splitter UI. Is this a custom widget built from scratch? If so, is there some way to bridge this into PyQt? Or am I missing something totally?
SL-C1000/pdaXii13