PDA

View Full Version : reading text value from QLineEdit located in a different module



krystosan
10th December 2012, 11:59
well this is turning out so weird or maybe I am doing it wrong

I am trying to read the value of QLineEdit text box but i am getting it empty

basically I wrote file in pyQt4 for UI,called RenderUI.py

and now from render.py

i am trying to access QLineEdit but getting it empty even when it filled with text
Below is render.py file and from it I did importation of RenderUI as ren
i can access the selected text from the QComboBox but not QLineEdit ??:( where I have print obj.scnFilePath.text()


import RenderUI as ren
import sys,os
from PyQt4 import QtCore,QtGui

class Actions(QtGui.QWidget):
def __init__(self):
pass
## super(Actions,self).__init__(self)

def makebatFileTasks(self):
obj=ren.Window()

print obj.scnFilePath.text()

## building the render string for bat file
print "render -r " + obj.renderer[str(obj.rndCB.currentText())] +"\
-im "

amleto
10th December 2012, 19:46
what is Window()?

maybe scnFilePath isn't the same lineedit that is on the gui.