Reply
Thread Tools
Posts: 161 | Thanked: 85 times | Joined on Feb 2010
#171
I know that i'm offtopic, but any news on pyqt destop widget? can someone point me to some example?
 
yamakasi's Avatar
Posts: 118 | Thanked: 13 times | Joined on Jun 2010 @ mother earth
#172
Originally Posted by attila77 View Post
Can you attach the .ui file ?
i didn't write the file manually i used Qt designer to generate the file,

i am using these packages:
python 2.6
PyQt GPL v4.7.6 for Python v2.6

Code:
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
 <class>MainWindow</class>
 <widget class="QMainWindow" name="MainWindow">
  <property name="geometry">
   <rect>
    <x>0</x>
    <y>0</y>
    <width>800</width>
    <height>400</height>
   </rect>
  </property>
  <property name="windowTitle">
   <string>MainWindow</string>
  </property>
  <widget class="QWidget" name="centralwidget">
   <widget class="QLabel" name="label">
    <property name="geometry">
     <rect>
      <x>220</x>
      <y>110</y>
      <width>261</width>
      <height>111</height>
     </rect>
    </property>
    <property name="font">
     <font>
      <pointsize>24</pointsize>
     </font>
    </property>
    <property name="text">
     <string>Hello World!</string>
    </property>
   </widget>
  </widget>
  <widget class="QMenuBar" name="menubar">
   <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
     <width>800</width>
     <height>18</height>
    </rect>
   </property>
  </widget>
  <widget class="QStatusBar" name="statusbar"/>
 </widget>
 <resources/>
 <connections/>
</ui>
Attached Files
File Type: zip helloworld.zip (546 Bytes, 109 views)

Last edited by yamakasi; 2010-09-19 at 08:28.
 
louispires's Avatar
Posts: 35 | Thanked: 11 times | Joined on Jul 2010 @ South-Africa
#173
Well i didn't get far, after step 3 i get an unknown error
Name:  Error.jpg
Views: 1049
Size:  36.3 KB

I followed step by step!
Please help
hw.ui.txtJust remove .txt
 
yamakasi's Avatar
Posts: 118 | Thanked: 13 times | Joined on Jun 2010 @ mother earth
#174
*sigh* i am really disappointed i have been waiting for 4 days now and no tried to help us
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#175
Originally Posted by yamakasi View Post
*sigh* i am really disappointed i have been waiting for 4 days now and no tried to help us
Sorry, but I can't reproduce the problem. Copy/paste from the code above and:

Code:
pyuic4 -o test.py -x test
python test.py
Produces a Hello World screen with no errors. So, something is wrong with your pyuic4, but I don't know how to help.

Same for the hw.ui.txt, gives Hello World with a "Click Me!" button.
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 

The Following 3 Users Say Thank You to fatalsaint For This Useful Post:
yamakasi's Avatar
Posts: 118 | Thanked: 13 times | Joined on Jun 2010 @ mother earth
#176
can you give us the links for the packages you are using ?
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#177
Originally Posted by yamakasi View Post
can you give us the links for the packages you are using ?
I use Ubuntu Linux.

Code:
$ pyuic4 --version
Python User Interface Compiler 4.7.2 for Qt version 4.6.2
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 

The Following User Says Thank You to fatalsaint For This Useful Post:
Posts: 24 | Thanked: 1 time | Joined on Jun 2010
#178
i am very new to this

i tried the procedures and installed all packages

PyQt GPL v4.7.6 for Python v3.1 and python 3.1.0

when i tried to compile the ui, i got an error like

Code:
D:\python>pyuic4 -x benvin.ui -o benvin.py
Traceback (most recent call last):
  File "C:\Python31\Lib\site-packages\PyQt4\uic\pyuic.py", line 4,
    from PyQt4 import QtCore
ImportError: DLL load failed: %1 is not a valid Win32 application.
my os is windows 7 64 bit

please help me
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#179
Originally Posted by bentech4u View Post
i am very new to this

i tried the procedures and installed all packages

PyQt GPL v4.7.6 for Python v3.1 and python 3.1.0

when i tried to compile the ui, i got an error like

Code:
D:\python>pyuic4 -x benvin.ui -o benvin.py
Traceback (most recent call last):
  File "C:\Python31\Lib\site-packages\PyQt4\uic\pyuic.py", line 4,
    from PyQt4 import QtCore
ImportError: DLL load failed: %1 is not a valid Win32 application.
my os is windows 7 64 bit

please help me
I haven't used pyuic for a while, but from what was posted above
Code:
pyuic4 -o test.py -x test
Compared to yours, there is a difference
Code:
pyuic4 -x benvin.ui -o benvin.py
To me it looks like you are trying to run pyuic from with a python console? i thought it needs to be run from within the dos prompt - also, the example has the .py first, and you put the.ui first....

a few bits, not got time to test and show at the moment though.
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#180
The reversal of the ui and the .py should not matter (as long as the .py follows the -o). That DLL import error and the "not valid win32 app" looks like PyQt itself is not installed properly.

My first guess would be that you are on 64-bit and the PyQt may be requiring 32. This came up with a quick google and it appears you aren't the only one with that problem.

There is a possible workaround in the second comment.. but as I don't have windows I have no idea if there's an easier way or that problems actually supposed to have been resolved by now (last post in Feb).
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!

Last edited by fatalsaint; 2010-09-21 at 23:24.
 
Reply


 
Forum Jump


All times are GMT. The time now is 07:09.