OESF Portables Forum
Everything Else => Zaurus - Everything Development => Distros, Development, and Model Specific Forums => Archived Forums => Python => Topic started by: siggy on December 21, 2004, 07:21:55 am
-
Hi Guys
just a quick question.
I've got a GUI up & running on windows & it seems to (generally) work on the Z.
I've got a QCanvasView on a tab and I'm trying to get the size of it.
Anyway, I get the size and I'm printing it to a QTextView window I have in the same app (located below the QCanvasView).
The text seems to be being printed to the QTextView window okay, but the VScrollBar isn't allowing me to scroll down to see the whole of the text on the Z!! The scroll bar & app seem to be working okay when being run on windows.
I tried using 'updateScrollBars()' after printing the text, but no joy.
Any ideas
Cheers
Pete
PS. I've attached the app files I'm working on.
PPS. Go easy, it's my first Python app - so I'm trying to learn Python & pyQt at the same time plus it's still early days in the dev
-
I'm just a beginner myself but I did notice one thing. I think the QApplication should be QPEApplication for use on the Z. I doubt that's causing you're problem though. I'm sure someone here knows the answer.
-
QTextView is obsolete under PyQt and you should use QListBox.
I have modified the code as follows and it works both in Windows XP and my Zaurus SL-5600 after compiling:
.
.
.
# comment read window - QTextView
self.textview = QListBox(self.tab2)
self.textview.setSizePolicy(QSizePolicy(7,5,self.textview.sizePolicy().hasHeight
orWidth()))
self.textview.setMinimumSize(QSize(0,50))
#self.textview.setHScrollBarMode(QTextView.AlwaysOff)
#self.textview.setVScrollBarMode(QTextView.AlwaysOn)
#self.textview.verticalScrollBar().setTracking(1)
.
.
.
self.textview.insertItem(QString(txt))
self.textview.insertItem(QString("end of guiDB"))
#self.textview.updateScrollBars()
-
Hi Guys
many thanks for the help, I'll implement both right now.
What documentation are you guys using?
I ask because the documentation that came with pyQt (ie. pyQt.html) states that
'QTextView (Qt v2+)
QTextView is fully implemented.'
So if my documentation is wrong, where can I /where did you get a correct set?
Many thanks again for your help. It's much appreciated.
Siggy
-
Advise to purchase PyQtDoc from theKompany.