# ui_mainwindow.py
################################################################################
## Form generated from reading UI file 'mainwindow.ui'
##
## Created by: Qt User Interface Compiler version 5.15.2
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
################################################################################
from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
if not MainWindow.objectName():
MainWindow.setObjectName(u"MainWindow")
MainWindow.resize(806, 551)
self.centralwidget = QWidget(MainWindow)
self.centralwidget.setObjectName(u"centralwidget")
self.pushButton = QPushButton(self.centralwidget)
self.pushButton.setObjectName(u"pushButton")
self.pushButton.setGeometry(QRect(224, 132, 271, 121))
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QMenuBar(MainWindow)
self.menubar.setObjectName(u"menubar")
self.menubar.setGeometry(QRect(0, 0, 806, 47))
MainWindow.setMenuBar(self.menubar)
self.statusbar = QStatusBar(MainWindow)
self.statusbar.setObjectName(u"statusbar")
MainWindow.setStatusBar(self.statusbar)
self.retranslateUi(MainWindow)
QMetaObject.connectSlotsByName(MainWindow)
# setupUi
def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(
QCoreApplication.translate("MainWindow", u"MainWindow", None)
)
self.pushButton.setText(
QCoreApplication.translate("MainWindow", u"Click Me", None)
)
# retranslateUi
I set dir="/home" in QFileDialog.getOpenFileName, by default the dialog should open /home, but it shows recent files instead. Also, the dialog is behind the main window, not on top.
Minimal code to reproduce:
I set
dir="/home"
inQFileDialog.getOpenFileName
, by default the dialog should open/home
, but it shows recent files instead. Also, the dialog is behind the main window, not on top.OS: ArchLinux Qt: 5.15.2+kde+r262-1 PySide2: 5.15.2-3 qgnomeplatform: 0.8.3-1 adwaita-qt: 1.4.1-2