Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey

All Questions

Tagged with
0 votes
0 answers
29 views

Many QPushButtons clicked connecting using exec() [duplicate]

I have write this code: def top_music_clips(self,clips): try: self.top_20_clips = clips counter = 0 for clip in self.top_20_clips: ...
Chris P's user avatar
  • 2,289
0 votes
0 answers
41 views

PyQt5 - Unable to get QPushButton to size properly in a QGridLayout

I wanted to get insight into widget resizing behavior I noticed, and it may have to do with wanting to create a set of push buttons in a grid. Here is a snippet: import sys from PyQt5.QtWidgets ...
lanewsa's user avatar
-2 votes
1 answer
273 views

Change a label after a specified time

I am trying to change a label on a button click and then after 3 seconds I want it to change back to nothing ("") my code is this: def apply_click(self): ui.label_ischanged.setText("...
Not0_0Parsa's user avatar
0 votes
0 answers
15 views

PyQT QPushButton Connection Problem - Wrong function being called [duplicate]

I am trying to create a side menu using PyQT6. I want the menu to be passed as a list like this menu = [ ("File", [("New", newHandler), ("Open", openHandler), ("Exit&...
user257330's user avatar
1 vote
1 answer
120 views

How to disable the size limit of the QPushButton in the QTableWidget in PyQt5?

I am trying to find solution by some time but nothing works so far.. I made a simple QTableWidget in PyQt5 and while casual QTableWidgetItems and QLabel resizes well using the option ....
Amae Saeki's user avatar
0 votes
0 answers
134 views

Pyqt can't shrink qPushButtons width even though text has lots more space

I have a pyqt window with some layouts and a QTabWidget (built in Qt Designer). I want to be able to shrink this window width-wise and height-wise, to the point that the set of buttons called "O&...
Clint Walker's user avatar
0 votes
1 answer
209 views

PyQt5: count seconds mouse is over QPushButton in tooltip

The following running code gives a window with a button on it . The tooltip displays when the mouse enters the button. import sys from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5....
温泽海's user avatar
  • 342
0 votes
1 answer
143 views

PyQt5 - Why my label is only showing the last line in my file?

I'm new in pyqt5 and I'm working on a gui that runs tasks from a txt file (each line is a task) i have a QLabel(txt_task_user) where i want to display line by line, and the QPushButton(user_f_b) that ...
xd0p0ui's user avatar
0 votes
3 answers
659 views

How to cancel the action of a selected button (QPushButton) when a new button is clicked in pyqt5?

`class MainWindow(QWidget): def init(self): super().init() self.setWindowTitle("Window") self.setGeometry(600, 100, 600, 400) self.Function() def Function(self): xpos = 10 ...
user19340419's user avatar
1 vote
1 answer
274 views

PyQt5: Why does QPushButton.setDefault() ignore spacebar but work for enter/return?

I have a modal with two buttons, one Accept and one Cancel. I set the cancel button to be the default with .setDefault() and .setAutoDefault() Pressing return activates the cancel-button, but when I ...
Meowf's user avatar
  • 65
0 votes
0 answers
171 views

How can I make QStandardItems in a QTreeView work like buttons opening a new window (submenu)?

I am fairly new to PyQt5 or rather to Qt in general, so sorry if this question is really dumb or basic. I am assigned working on an application for some rather complex scientific data analysis that ...
foobar_funderbaz's user avatar
0 votes
0 answers
21 views

Connecting multiple buttons to a single function in PyQt5 [duplicate]

I'm trying to connect multiple buttons to a single function where depending on the button chosen, the location where the results would be returned will differ. I want the function to recognize which ...
color_blue's user avatar
0 votes
1 answer
3k views

Rounded corners not shown for QPushButton in Qt Designer

I want to the corners to be rounded and hover for a QPushButton in Qt designer. Changing the style sheet has no effect. What am doing wrong? QPushButton#pushButton_3{ background: rgb(170, ...
Pari's user avatar
  • 17
0 votes
1 answer
609 views

How to figure out whether button is continuosly pressed or not in PyQt5?

For my application, I need my lift system to go up as long as the button is pressed and it should stop when I don't press the button. clicked() function is not functional for this purpose. However ...
user avatar
0 votes
0 answers
13 views

PyQt QPushButton clicked connect lambda can't get correct value [duplicate]

I dynamically add QPushbutton with a loop in which the button is setup with clicked even using lambda. But when I click the button, it can't print the correct value for me. It always give me the last ...
NorthBig's user avatar

15 30 50 per page
1
2 3 4 5
11