Results 1 to 2 of 2

Thread: reading text value from QLineEdit located in a different module

  1. #1
    Join Date
    Nov 2012
    Posts
    35
    Thanks
    1
    Thanked 7 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default reading text value from QLineEdit located in a different module

    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()
    Qt Code:
    1. import RenderUI as ren
    2. import sys,os
    3. from PyQt4 import QtCore,QtGui
    4.  
    5. class Actions(QtGui.QWidget):
    6. def __init__(self):
    7. pass
    8. ## super(Actions,self).__init__(self)
    9.  
    10. def makebatFileTasks(self):
    11. obj=ren.Window()
    12.  
    13. print obj.scnFilePath.text()
    14.  
    15. ## building the render string for bat file
    16. print "render -r " + obj.renderer[str(obj.rndCB.currentText())] +"\
    17. -im "
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: reading text value from QLineEdit located in a different module

    what is Window()?

    maybe scnFilePath isn't the same lineedit that is on the gui.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

Similar Threads

  1. Reading Text Files for Graphing
    By Atomic_Sheep in forum Newbie
    Replies: 2
    Last Post: 25th January 2012, 21:34
  2. QXmlStreamReader not reading text within tags
    By Ceaser88 in forum Newbie
    Replies: 2
    Last Post: 24th July 2011, 10:06
  3. Replies: 4
    Last Post: 19th April 2011, 08:51
  4. Reading from text file
    By jerkymotion in forum Qt Programming
    Replies: 5
    Last Post: 17th March 2011, 11:26
  5. Reading text from a PlainTextEdit
    By Bertie in forum Newbie
    Replies: 5
    Last Post: 9th March 2011, 14:24

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.