Now the main window's layout is ugly when the dimension and/or language changes. Try using proper subclass of QLayout to resolve it.