Python Forum
[PyQt] Newbe question about Print() to PyQt
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] Newbe question about Print() to PyQt
#5
(Dec-18-2017, 10:32 PM)TimW Wrote: I don't understand how to "Print()" to a text window.

In PYQT there are different widgets each for input, output display, buttons etc.

There is no print() function.{Print just works on Console}
Though widgets can be used to display text on the screen.

eg-
There's a textBrowser widget, who's setText property can be used to display a string.

textbr = QTextBrowser()
textbr.setText("This string will be displayed")
If you're having trouble starting with UI designing with PYQT, I recommend using QTDesigner initially. Its simple drag and drop.And then the code can be converted to python.
Reply


Messages In This Thread
Newbe question about Print() to PyQt - by TimW - Dec-18-2017, 10:32 PM
RE: Newbe question about Print() to PyQt - by TimW - Dec-19-2017, 02:54 AM
RE: Newbe question about Print() to PyQt - by hbknjr - Dec-19-2017, 05:56 AM
RE: Newbe question about Print() to PyQt - by TimW - Dec-19-2017, 05:19 PM
RE: Newbe question about Print() to PyQt - by TimW - Dec-19-2017, 10:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyQt] print an image using PyQt micro 4 2,798 Jan-08-2020, 03:50 PM
Last Post: Denni
  Question regarding python pyqt script cibb 2 2,609 Feb-18-2018, 03:03 AM
Last Post: Raures

Forum Jump:

User Panel Messages

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