I’m baffled by the results of using QSettings to save the state of my radio buttons from one app session to another using PyQt5. (OS = Ubuntu Linux 18.04) These are the steps to produce baffling results: Run the app; see both radio buttons selected; both buttons fire as if mouse selected Deselect the top radio button Close the app;
Tag: pyqt5
How to align two widgets more closely in PyQt5 layouts?
How to align two widgets more closely? In my code, I want to align QLabel 1 and QLabel 2 more closely (i.e. QLabel 2 aligned just below the QLabel 1, with minimum spacing). Answer I assume what you’re trying to achieve is a double underline for the text in the first label. The problem with your example is that the
How to use QSortFilterProxyModel to do data aggregation
I used QSortFilterProxyModel to filter the model data and display it in a tableView. Then I want to aggregate the filtered data, so I created a new tableView2 to display the filtered data aggregation. I created a new QSortFilterProxyModel to aggregate the data, but I don’t know how to get the source data, and then increase the data But with
PyQt5 QDoubleValidator don’t allow to write dot separators : x.y
Hello everyone, I’m trying to develop a GUI to modify and make computation on Pandas DataFrames with the PyQt5 module. I could actually display my DataFrame, and Edit specific column or not. It’s displayed in a QTableWidget. I tried to implement a QItemDelagate with the QDoubleValidator to write only specifics numbers in cols. This is my function : I can
Why my PyQt5 Webview Code is not working?
This is my code. Why its not working? Where is my problem? Answer Your code has 2 problems: The QWebEngineView is not a child of the window so it will not be displayed. Change to self.widget = QWebEngineView(Form) QUrl(“google.com”) is not a valid url so you have 2 options, change to: QUrl(“https://google.com”) OR QUrl.fromUserInput(“google.com”)
Connect to MS access database using PyQt5
I’m trying to connect to a MS access database using the following code: I have office 2019 installed. I cannot figure out what is wrong in the connection string or the driver. Answer I figured out that this problem happened because I have a 64-bit of python and a 32-bit of access database engine driver. After installing the 64-bit access
How to Detect collisions in PyQt5
Iam making a simple game using PyQt, but i don’t know how i can detect the collisions between enemy and bullets, there is a C++ implementation, but i dont know how i can do that in PyQt. and it should be done in Bullet.py file. these are the files. Window.py Player.py Enemy.py Bullet.py Score.py from PyQt6.QtWidgets import QGraphicsTextItem from PyQt6.QtCore
How to store the last checked item as default, when Opening next time , in PyQt5 QRadioButton?
It’s my code. How to store the lastly clicked/checked button as default in the next opening of the programme? For example: If we run the programme and click the 3rd button and close the entire programme. Whenever I reopen/re-run the programme, the lastly clicked button is checked by default ( ie. third button is checked by default) Answer You can
How to dynamically add widgets to a layout after a button is clicked [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 1 year ago. Improve this question Whenever i click the + button i want to add a new row just like the first one ( a new + button next to