Le 24/12/2010 01:38, Algis Kabaila a écrit :
On Friday 24 December 2010 09:25:51 you wrote:
Le 23/12/2010 22:19, Algis Kabaila a écrit :
On Friday 24 December 2010 04:09:43 Puiseux wrote:
hello,

a problem with pyside-uic that gives an empty output file
with - untitled.ui made by designer (4.6.2)
- pyside-uic version 0.2.4
- pyside 1.0

puis...@puiseux-laptop:~/devel/total/branchePySide/pyMXF/q
tgu i$ pyside-uic untitled.ui -d
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file
'untitled.ui' #
# Created: Thu Dec 23 18:01:53 2010
How did you call the pyside-uic?  Did you issue the command
like

pyside-uic untitled.ui>   myoutput.py

and found that myoutput.py was an empty file? Or what?

OldAl.
I've tried both
$ pyside-uic untitled.ui

to obtain (empty) output on stdout
and

$ pyside-uic untitled.ui>   untitled.py

untitled.py was also empty, of course
Pierre
Pierre,

I copied your file, opened it with the Qt Designer, saved it
still as untitled.ui.  Then ran it in the following dialog:

******************************
a...@supremo:~$ pyside-uic untitled.ui>  ui_untitled.py
a...@supremo:~$ ls ui_untitled.py
ui_untitled.py
a...@supremo:~$ ls -l ui_untitled.py
-rw-r--r-- 1 ak ak 1164 2010-12-24 11:17 ui_untitled.py
a...@supremo:~$ cat  ui_untitled.py
# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file
'untitled.ui'
#
# Created: Fri Dec 24 11:17:06 2010
#      by: PySide uic UI code generator
#
# WARNING! All changes made in this file will be lost!

from PySide import QtCore, QtGui

class Ui_Form(object):
     def setupUi(self, Form):
         Form.setObjectName("Form")
         Form.resize(400, 300)
         self.pushButton = QtGui.QPushButton(Form)
         self.pushButton.setGeometry(QtCore.QRect(60, 40, 99,
27))
         self.pushButton.setObjectName("pushButton")
         self.label = QtGui.QLabel(Form)
         self.label.setGeometry(QtCore.QRect(60, 160, 67, 17))
         self.label.setObjectName("label")

         self.retranslateUi(Form)
         QtCore.QMetaObject.connectSlotsByName(Form)

     def retranslateUi(self, Form):
         Form.setWindowTitle(QtGui.QApplication.translate("Form",
"Form", None, QtGui.QApplication.UnicodeUTF8))
         self.pushButton.setText(QtGui.QApplication.translate("Form",
"PushButton", None, QtGui.QApplication.UnicodeUTF8))
         self.label.setText(QtGui.QApplication.translate("Form",
"TextLabel", None, QtGui.QApplication.UnicodeUTF8))

a...@supremo:~$ pyside-uic --version
Python User Interface Compiler version 0.2.3 for PySide
a...@supremo:~$
******************************

So I do get a respectable looking Python file.  From what I see
the differences are that my Python file is named by a different
name than the source file (that should not matter IMO) and my
utilities version is 0.2.3 whilst yours is 0.2.4.  That SHOULD
not matter, either.

Try some of the very simple examples that I suggested from
http://developer.qt.nokia.com/wiki/PySide_Newbie_Tutorials. Just
one will do - say
http://developer.qt.nokia.com/wiki/PySideSimplicissimusCloseButton

If that  looks too complex, just write back with a name for your
"untitled" with a description of what you wanted it to display
and I will endeavour to make a solved  example from it for you
and for other newbies.

OldAl.
My untitled.ui was just a small example to show behaviour of pyside-uic !

when i try with quitter.ui (from 
http://developer.qt.nokia.com/wiki/PySideSimplicissimusCloseButton), I get 
exactly the same empty python file :

puis...@puiseux-laptop:~/devel/examplesPython$ pyside-uic quitter.ui>  
ui_quitter.py

An unexpected error occurred.

puis...@puiseux-laptop:~/devel/examplesPython$ less ui_quitter.py

# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'quitter.ui'

#

# Created: Fri Dec 24 07:27:39 2010

#      by: PySide uic UI code generator

#

# WARNING! All changes made in this file will be lost!

ui_quitter.py

(END)

I try previous release of pyside-uic (0.2.3) and have the same result : empty 
file !

Well, i suspect an incompatibility between different releases of pyside (Qt4?) 
i have installed on my computer

So I remove every pyside and pyside-tools (ubunt regular version with 'apt-get 
remove', and snapshot version with 'cd build' and 'make uninstall')

Then I re-install regular version (apt-get install)... Same result

It may comes from Qt4.6.2, or designer ?

The debug option can help ?

puis...@puiseux-laptop:~/devel/examplesPython$ pyside-uic quitter.ui -d

# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'quitter.ui'

#

# Created: Fri Dec 24 08:52:59 2010

#      by: PySide uic UI code generator

#

# WARNING! All changes made in this file will be lost!

Traceback (most recent call last):

  File "/usr/bin/pyside-uic", line 75, in main

    options.indent)

  File "/usr/bin/pyside-uic", line 39, in generateUi

    pysideuic.compileUi(uifname, pyfile, execute, indent)

  File "/usr/lib/pymodules/python2.6/pysideuic/__init__.py", line 73, in 
compileUi

    winfo = compiler.UICompiler().compileUi(uifile, pyfile)

  File "/usr/lib/pymodules/python2.6/pysideuic/Compiler/compiler.py", line 37, 
in __init__

    CompilerCreatorPolicy())

  File "/usr/lib/pymodules/python2.6/pysideuic/uiparser.py", line 104, in 
__init__

    self.factory = QObjectCreator(creatorPolicy)

  File "/usr/lib/pymodules/python2.6/pysideuic/objcreator.py", line 79, in 
__init__

    raise WidgetPluginError, "%s: %s" % (e.__class__, str(e))

WidgetPluginError:<type 'exceptions.KeyError'>: 'pluginType'

Anyway, thank you for time you spend for me.

Pierre



_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside

Reply via email to