Thursday, 15 April 2010

button - Fitting signals to slots in Qt -


I enable a QPushButton after another QPushButton Trying to click and I have participated in a problem first QPushButton one clicked () can remove the signal, while the second QPushButton has only the setEnabled (bool) slots and set to disable (boole) .

Actually, I am trying to do

  connect (ui-> pbViewVolume, signal (clicked)), UI-> pbSaveAsImage , Slot (setEnabled)));   

Since it is not possible to send a signal with less parameters compared to the slot, how can I do this? My only way is my main window like

  zero EnableSaveAsImageButton () {ui- & gt; PbSaveAsImage-> To create a public slot for setEnabled (true); }   

But I will not fill my main window with functions of this type of garbage.

  • You do not need to make this slot public, make it private. "Post-lesson" itemprop = "text">
    1. You have to create that slot.
    2. This function is not garbage.

  • No comments:

    Post a Comment