Help - Search - Members - Calendar
Full Version: Problem With Code
OESF Forums > Distros, Development, and Model Specific Forums > Everything Development > Python
siggy
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 smile.gif
slapout
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.
freizugheit
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()
siggy
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
freizugheit
Advise to purchase PyQtDoc from theKompany.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.