Search code examples
user-interfaceprintingpyqt4qt-designer

How can I show "run" console in pyqt GUI (QTdesigner)?


I'm making a web crawling GUI using selenium and PyQt (Qt designer) before I used GUI, I checked my process in web crawling using print like :

for i / len(href_list):
 print (i,"/", len(href),"processing..")

then, I get

1/10 processing...
2/10 processing...

in pycharm 'run' console.

But In GUI, there are no 'run' console (even their is prompt window behind my GUI)So I cannot check my progress. I think I can solve this problem using 'Text browser' in Qt designer, but I don't know how to connect this module.

so, My question is how can I show (print('blablabla')) in GUI?

thanks.


Solution

  • You have several options in PyQT.

    For example, by using QPlainTextEdit you may create console-like box within your GUI.

    see: PyQt Multiline Text Input Box

    http://pyqt.sourceforge.net/Docs/PyQt4/qplaintextedit.html