Python Forum
set default font main window pyside
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
set default font main window pyside
#1
I am setting a simple text editor with PySide (python) and I would like to set the default font as, let's say, liberation mono. I am not interested in changing the font so I just need to set the font once for the main object. How would i do that?
this is the code I wrote to implement the main window:
class MainWindow(QMainWindow):
    def __init__(self):
        super(MainWindow, self).__init__()
        self.initGUI()

    def initGUI(self):
        self.setWindowTitle("ScribblerSeq")
        self.setWindowIcon(QIcon('./icon/appicon.png'))
        self.setGeometry(1200, 1800, 800, 600)
        self.statusLabel = QLabel('Showing Progress')
        self.CreateProgessBar()
        self.CreateStatusBar()
        self.center()
        self.SetupComponents()
        self.show()
thank you
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Interaction between Matplotlib window, Python prompt and TKinter window NorbertMoussy 3 486 Mar-17-2024, 09:37 AM
Last Post: deanhystad
  [PySide / PyQt] Offset two images with keyboard increments carecavoador 1 992 Sep-09-2023, 12:53 PM
Last Post: deanhystad
Exclamation [Tkinter] Error when closing the main window with destroy TomasSanchexx 1 773 Aug-06-2023, 01:54 AM
Last Post: deanhystad
Question Rows and colums list. PySide 6 britesc 2 908 May-31-2023, 09:00 PM
Last Post: deanhystad
  [PyQt] Can't get MDIarea to resize automatically with Main Window JayCee 4 3,463 Aug-02-2021, 08:47 PM
Last Post: JayCee
  Drawing in PySide Leo_Red 3 2,824 Jun-26-2021, 09:30 AM
Last Post: Axel_Erfurt
  [PyQt] How to clip layout to sides and bottom of main window? Valmont 9 4,898 Mar-24-2021, 10:00 PM
Last Post: deanhystad
  "tkinter.TclError: NULL main window" Rama02 1 5,841 Feb-04-2021, 06:45 PM
Last Post: deanhystad
  [Tkinter] Hi, Keep postition of main window after iconify() delphinis 3 3,100 Jul-12-2020, 06:59 AM
Last Post: DT2000
  [Tkinter] Auto re-fit frames sizes in main window Gilush 2 2,647 Jun-06-2020, 03:14 AM
Last Post: Gilush

Forum Jump:

User Panel Messages

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