Re: Da newbie
  Home FAQ Contact Sign in
it.comp.lang.python only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Da newbie         

Group: it.comp.lang.python · Group Profile
Author: Simone
Date: Apr 24, 2008 00:26

_caciocavallo_ ha scritto:
>>> from Ui_GUIFF import Ui_GUIFF
>>> Mi dice: "cannot import name Ui_GUIFF"
>>
>> Ma nel file Ui_GUIFF.py c'è qualcosa del tipo:
>>
>> class Ui_GUIFF(object):
>> def setupUi(self):
>> ...
> Si c'è
>
> class Ui_Dialog(object):
> def setupUi(self, Dialog):

Come sospettavo... occhio che quello che devi importare è Ui_Dialog non
Ui_GUIFF.

Quindi l'import è:

from Ui_GUIFF import Ui_Dialog

Forse nell'esempio era meglio se usavo nomi completamente diversi e non
non sono stato molto chiaro. :D

Se vuoi cambiare quel "Ui_Dialog" basta cambiare l'object name dal
QtDesigner e, ovviamente, anche l'import.

Simone
no comments
diggit! del.icio.us! reddit!