17 questions
0
votes
1
answer
337
views
How to detect Qt mouse events only over QPainted objects
I am attempting to produce a compass widget programatically that looks much like this:
I want each "slice" of the compass to act as a button for interaction w/ the rest of the app. To that ...
1
vote
1
answer
374
views
problem with SIGNAL SLOT new notation for QAbstractButton
I am writing a small utility composed by :
1) 4 QToolBar
2) 1 QToolBox
3) 1 QMenu
4) 1 QGraphicsView
I have some buttons on the QToolBox, each button represents a grid with different spacing.
...
2
votes
0
answers
76
views
Signal/slot not working just in a few objects
I want to connect the clicked signal of some abstract buttons to a same slot. The thing is that it only works on one abstract button, when clicking on the others nothing occurs. Any ideas of what is ...
2
votes
2
answers
435
views
How to Set and Get "comment" text using setText?
I am trying to store string data within a QAbstractButton.text().
Why?
I want to display the short name in the text() itself, but be able to call the long name via the text() "comment" through code.
...
2
votes
1
answer
493
views
Problems aligning buttons in widget in pyqt5
I've been trying to create a widget with image background and two buttons (cancel and ok) with image and push down/up effect, using pyqt5 GUI of python language, but I have two problem:
1 – I can't ...
0
votes
1
answer
1k
views
'void QAbstractButton::clicked(bool)' is protected
I'm actually working on a project with Qt 5.10.1. I'm using Linux and my partners are using Windows.
We've written this piece of code:
QCheckBox* _survive[9] = {
ui->survive0, ui->...
0
votes
1
answer
1k
views
PyQt5 - add AbstractButton to layout
I'm making a Solitaire card game to practice OOP and PyQt5, and I'm having trouble adding a card, which inherits QAbstractButton, to a layout (QGridLayout, QHBoxLayout, or QVBoxLayout). Here is part ...
0
votes
1
answer
182
views
Can i use my own user defined string in 'setDefaultButton'
I would like to use my own string on the button, in the the below mentioned functions "msgBox.setDefaultButton" and "msgBox.addButton" :
msgBox.setDefaultButton(QMessageBox::Save);
msgBox.addButton(...
2
votes
1
answer
9k
views
Creating Custom PyQt5 image-button
I'm trying to create a custom PyQt5 button, but am running across problems displaying it in a QMainWindow object. Here's the code I'm trying:
import sys
from PyQt5.QtGui import *
from PyQt5....
0
votes
1
answer
324
views
Why QAbstractButton emit all signals when using keyboard navigation?
I have a couple of custom buttons derived from QAbstractButton with autoExclusive and checkable property TRUE witch are applied to the same parent.(so the only one item can be checked at the same time)...
2
votes
2
answers
13k
views
Paint device returned engine == 0, type: 1
I have seen many answers for the same Question, I have already gone through them but none them solved my problem, I am getting the error
QWidget::paintEngine: Should no longer be called
QPainter:...
0
votes
1
answer
916
views
How to turn off QAbstractButton animateClick when lineEdit has focus
I am new to QT GUI programming and I am using QT Creator. The problem I am seeing is with my pushbutton and line edit when the user presses the enter key. My program opens a groupbox and allows the ...
6
votes
1
answer
2k
views
Painting custom QWidget based on style sheet pseudo-state value
I have a custom QWidget (actually, derived from QAbstractButton) for which I have to implement my own paintEvent. How to I use the style sheet information?
For example, suppose someone defines the ...
1
vote
1
answer
793
views
Qt QAbstractButton setDown interferes with grabMouse
I have some weird behaviour in Qt that seems like a defect. I'd like to know if anybody has a good workaround.
I have a popup widget that contains many buttons in it. The user activates the popup by ...
2
votes
1
answer
3k
views
paintEvent is not getting called in a custom button derived from QAbstractButton
I'm trying to create a custom button, derived from QAbstractbutton.
I have overridden the paintEvent. However, my button is not visible in my widget.
What I see is that the paintEvent is not getting ...
2
votes
1
answer
917
views
What is the purpose of the QAbstractButton::checkStateSet() method?
I'm writing my own 4 state button and I'm not quite sure what to put in the checkStateSet() method, if anything.
Here is what I've got so far:
SyncDirectionButton::SyncDirectionButton(QWidget *...
1
vote
1
answer
686
views
Two shortcuts for a QAbstractButton
I need to assign two shortcuts to a QAbstractButton, but I cannot find a way to do that.
It seems the only method is QAbstractButton::setShortcut(const QKeySequence & key).
Is it possible ?