Friday 15 August 2014

c++ - How to use boost::bind with "this" pointer? -


The following error is outputting the following error code:
  Error C2663: 'Promote':  

itemprop = "text" : Signal0 & lt; R, Combiner, Group, GroupCompare, SlotFunction & gt; :: Connect: [R = Zero, Combiner = Promotion: last_value & lt This' indicator 'has no legal conversion for 2 loads'; Zero & gt;, Group = Integer, GroupCompare = Std :: Low & lt; Int & gt; SlotFunction = boost :: function & lt; Zero (zero)> ]

Here is the code:

  RepositoryEditor :: RepositoryEditor (Constant Promotion :: Indication & lt; zero () & gt; & scenarioHasChangedSignal, QWidget * Parents): QDialog (parent), m_pActionRemove (new QAction (this)) {ui.setupUi (this); M_pActionRemove-> SetText ("Remove"); M_pActionRemove-> Settool Tip ("Remove this device"); Connect (m_pActionRemove, signal (trigger ()), this, slot (onActionRemoveClicked ())); Connect (ui.buttonBox, Signal (clicked (QAbstractButton *)), this, slot (onButtonClicked (QAbstractButton *))); Connect (ui.treeWidgetDevicesList, Signal (Item Selection Changed ()), This, Slot (onItemSelectionChanged ())); Connect (this signal (itemRemovedFromTree (Static Events :: VCS :: PnPDevice & amp;.)), RepositoryManager :: getInstance () getRepository (), slot (removeDevice (constant events :: VCS :: PnPDevice & amp;)) ; Connect (RepositoryManager :: getInstance () getRepository (), hint (deviceAdded (constant DeviceItem & amp;.)), This, slot (addItemInTree (constant DeviceItem & amp;)); Connect (Repository Manager: getInstance (). GetRepository (), Signal (Device Updates (Cant Displays & amp;)), This Slot (Update Identity & Containment); Scenario HaschangedSignal.connect (Promotion :: Bind (& Amp; Repository Editor :: UpdatesAllRoottime, this)) ;--> Set WindowFlags (it-> Window Flag () & amp; ~ Qt :: WindowContextHelpButtonHint;} - Set-Attribute (QT :: WA_DeleteOnClose, true); initTreeView ();} zero repository editor :: updateAllRoottime () {int index = ui.treeWi DgetDevicesList-> ToplessItemacount (); (Int i = 0; I & lt; index; I ++) {Root Atom Root Itam = (ui.treeWidgetDevicesList-> TopLive Item (I)) -> Data (0 , QT :: UserRoll; Price & amp;; RootItem & gt; (); (Ui.treeWidgetDevicesList-> topLevelItem (i)) - & gt; setText (0, "test");}}  

The question is: How to use the Tomb Function with "this" indicator?

Thanks

< Div class = "post-text" itemprop = "text">

It states that the scenario is a signal signal const while the connect is a non-con Member function, which can not be called on any object Const. Announce the scenario HasChangedSignal non-const boost :: signal & lt; Void () & gt; & Amp; .

No comments:

Post a Comment