Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
what is this error
#11
You need wheel for you python version(32 or 64bit)
Here a run,i also make sure that pip is upgraded(9.0.1).
# Here you see that i have 32 bit version of Python
C:\>cd python27
C:\Python27>python
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

# Upgrade pip
C:\Python27>cd scripts
C:\Python27\Scripts>pip install --upgrade pip
Requirement already up-to-date: pip in c:\python27\lib\site-packages
# It's okay
C:\Python27\Scripts>pip -V
pip 9.0.1 from c:\python27\lib\site-packages (python 2.7)

# Install for 27 and 32 bit version of Python
C:\Python27\Scripts>pip install PySide-1.2.2-cp27-none-win32.whl
Processing c:\python27\scripts\pyside-1.2.2-cp27-none-win32.whl
Installing collected packages: PySide
Successfully installed PySide-1.2.2
Reply
#12
i used your guide...

[Image: qn7r_capture.jpg]
Reply
#13
So, guys ...
what is this New Error !!!!    Angel

i convert .ui to .py  .   when i want to use it reception error. 

No Modules named QTCore !!! from PySide.   Think


[Image: mf5z_capture.jpg]
Reply
#14
well, it's QtCore, not QTCore. Note the CAPS T in your case
Reply
#15
thankyou.


this code from qtui.py (qt desingner code)

from PySide import QtCore, QtGui

class Ui_Dialog(object):
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(455, 308)
        self.savebtn = QtGui.QPushButton(Dialog)
        self.savebtn.setGeometry(QtCore.QRect(70, 240, 75, 23))
        self.savebtn.setObjectName("savebtn")
        self.closebtn = QtGui.QPushButton(Dialog)
        self.closebtn.setGeometry(QtCore.QRect(190, 240, 75, 23))
        self.closebtn.setObjectName("closebtn")

        self.retranslateUi(Dialog)
        QtCore.QObject.connect(self.closebtn, QtCore.SIGNAL("clicked()"), Dialog.close)
        QtCore.QMetaObject.connectSlotsByName(Dialog)

    def retranslateUi(self, Dialog):
        Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "Dialog", None, QtGui.QApplication.UnicodeUTF8))
        self.savebtn.setText(QtGui.QApplication.translate("Dialog", "Save", None, QtGui.QApplication.UnicodeUTF8))
        self.closebtn.setText(QtGui.QApplication.translate("Dialog", "Close", None, QtGui.QApplication.UnicodeUTF8))
new modules for use ui

from PySide.QtGui import *
from PySide.QtCore import *
from qtui import Ui_Dialog

class newpanel (QWidget,Ui_Dialog):
    def __init__(self):
        super(newpanel, self).__init__()
        self.setupUi(self)
app = QCoreApplication([])
form = newpanel()
form.show()
app.exec_()
Error:
QWidget: Cannot create a QWidget when no GUI is being used
Reply
#16
Can anyone help me?

i copy this very simple code from  https://wiki.qt.io/Hello_World_in_PySide    .

but when i want run this code i reception this error.

#!/usr/bin/python
 
import sys
 
import PySide
from PySide.QtGui import QApplication
from PySide.QtGui import QMessageBox
 
# Create the application object
app = QApplication(sys.argv)
 
# Create a simple dialog box
msgBox = QMessageBox()
msgBox.setText("Hello World - using PySide version " + PySide.__version__)
msgBox.exec_()
Error:
QWidget: Cannot create a QWidget when no GUI is being used
what is QWidget error
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020