signal-slot

Qt: Do events get processed in order?

If I had a class A, where one of its functions does: void A::func() { emit first_signal(); emit second_signal(); } Assuming that a class B has 2 slots, one connected to first_signal, and the other to second_signal, is it guaranteed that the slot that is connected to first_signal will always be processed before the second_signa...

Connecting to a signal hidden by QMessageBox

I want to show the user a warning QMessageBox with a link inside. This is relatively easy, I just need to make sure I set the RichText text format on the message box and the QMessageBox setup does the rest. However, I would also like to close the message box (as in some-sort-of-call-to done()) if the user clicks on the link - the semanti...

Architecture for Qt SIGNAL with subclass-specific, templated argument type

I am developing a scientific data acquisition application using Qt. Since I'm not a deep expert in Qt, I'd like some architecture advise from the community on the following problem: The application supports several hardware acquisition interfaces but I would like to provide an common API on top of those interfaces. Each interface has a...

How to tell the mouse button using QApplication::mouseButtons() in a "click" slot??

I have a QMainWindow, and want to handle the "clicked" signal from a smaller widget (such as tableview) inside it. Originally I connect the signal to a slot of this QMainWindow, this is the most common approach. Now I need to tell which mouse button is clicked, and do different things for left and right button, I found that the "clicke...

PyQt4 Custom dialog not showing

Hi, i'm working with PyQt4 to make a simple Python GUI app. The situation is the following: i have an QMainWindow displaying a central widget and a QDockWidget containing this custom Widget: class ListTagWidget(QWidget): def __init__(self, parent = None): super(ListTagWidget, self).__init__() addButton ...

How to map Qt Signal to Event in Managed C++ (C++/CLI)

I'm writing a wrapper in .NET (C++/CLI) to be able to use some native C++ Qt code in .NET. How can I map a Qt signal into a managed .NET event, so that when my Qt code fires off a signal, I can bring this forward to the .NET code. My Managed class defines the event, but if I try to use the normal QObject::connect method to hook up to th...