OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

> Pyqt Won't Display Text, Text on buttons and labels don't show up
snowfarthing
post Jun 22 2006, 06:24 AM
Post #1





Group: Members
Posts: 32
Joined: 29-October 04
Member No.: 5,265



I've tried a couple of "Hello, world" programs on my Zaurus. Both of them almost work, and I'm thrilled! except that "Hello, world!" doesn't show up on either of them.

Here's one of the programs (the simpler of the two):

CODE
import sys
from qt import *

myapp = QApplication(sys.argv)

mylabel = QLabel("Hello, world!", None)
mylabel.resize(120, 30)

myapp.setMainWidget(mylabel)
mylabel.show()
myapp.exec_loop()

I've tried both of these programs on my Linux desktop, and the text shows up just fine there. I suspect it might have something with font settings, but I'm just barely learning Qt, and don't know enough about it to know for sure.

What is the cause of this difficulty, and how can I fix it?
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies (1 - 5)
freizugheit
post Jun 22 2006, 11:25 PM
Post #2





Group: Members
Posts: 409
Joined: 7-November 03
Member No.: 811



It works on my SL-5600.

Maybe it was due to the Python compiler.

Try to use this version of Python for Python programming on Zaurus.
Go to the top of the page
 
+Quote Post
snowfarthing
post Jun 23 2006, 05:39 AM
Post #3





Group: Members
Posts: 32
Joined: 29-October 04
Member No.: 5,265



Unfortunately, that won't work for me: I'm using OpenZaurus 3.5.4. I feel so stupid forgetting to mention that! (To keep that from happening again, I decided I should use a signature.)
Go to the top of the page
 
+Quote Post
snowfarthing
post Jul 29 2006, 12:34 PM
Post #4





Group: Members
Posts: 32
Joined: 29-October 04
Member No.: 5,265



I've had the opportunity to test a couple of other programs. Apparently it's a font issue of some sort (since, if I use a listbox, the lists are available but invisible and very tiny); since I have no idea what's wrong with it, I'll probably report it as a bug as soon as I could figure out where I should report it!
Go to the top of the page
 
+Quote Post
Mickeyl
post Jul 30 2006, 12:53 AM
Post #5





Group: Members
Posts: 1,497
Joined: 12-November 03
From: Germany
Member No.: 907



Sounds like the default font is not found. Try to use a QPEApplication instead -- this will set the correct default font.
Go to the top of the page
 
+Quote Post
milokp
post Sep 5 2006, 05:09 PM
Post #6





Group: Members
Posts: 1
Joined: 5-August 06
Member No.: 10,644



QUOTE(snowfarthing @ Jun 22 2006, 09:24 AM)
I've tried a couple of "Hello, world" programs on my Zaurus.  Both of them almost work, and I'm thrilled! except that "Hello, world!" doesn't show up on either of them.

*


To remidy this in the past (though it seems the most recent versions with OZ on my Collie don't need it) I've had to

CODE
Zaurus=True

from qt import *
if(Zaurus):
   from qtpe import *


in my code.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 28th December 2014 - 10:06 PM