Home > Mobile >  There are two classes, a class of functions to be callback to a different class of methods how to im
There are two classes, a class of functions to be callback to a different class of methods how to im

Time:11-30

Class A is A public class, responsible for data analysis, according to get effective data frame format,

Class B is A window class, he want to call A function in A data parsing, then call this method in A class B the method of drawing curve, save the TXT data such as


Excuse me, how to achieve


Now there is A way of thinking is A class B as class A subclass, implementation of A virtual function, want to consult other ideas, thank you!

CodePudding user response:

Need to use singleton object class, don't need to directly use static object function

CodePudding user response:

reference 1st floor Italink response:
need to use singleton object class, don't need to directly use static object function


Static functions as a callback function to the current object to use as I pass, compile error

CodePudding user response:

refer to the second floor number007cool response:
Quote: refer to 1st floor Italink response:

Need to use singleton object class, don't need to directly use static object function


Static functions as a callback function to the current object to use as I pass, compile error

What the problem is that you read the newspaper in the wrong information, it is good to solve the ah

CodePudding user response:

Are in Qt development, why not use signals slot mechanism, or a callback, flexible signal in Qt slot than callback a lot

CodePudding user response:

reference 4 floor juelianhuayao response:
is done with Qt development, why not use signal slot mechanism, or a callback, flexible signal in Qt slot than callback many oh
god wants us to meet a few wrong people wake up a language...
  •  Tags:  
  • Qt
  • Related