fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class OtdelniyClassPolucheniyaDannix : QObject
  5. {
  6. ...
  7. Q_PROPERTY QAbstractItemModel* model poluchitModel() // nu ty ponel
  8. Q_INVOKABLE QAbstractItemModel* poluchitModel() { ... }
  9.  
  10. void ustanovitNovieDannie(void* govno)
  11. {
  12. ... ustanavlivaem vse dannie u suem v nashi modeli, I NE ZABUD` ZA EMITY modeley
  13. }
  14. }
  15.  
  16. // qml
  17.  
  18. ProstoiDelegate
  19. {
  20. Text { text: "govno" }
  21. }
  22.  
  23. SlojniyDelegate
  24. {
  25.  
  26. MoeOxuennoeTreeView
  27. {
  28. model: OtdelniyClassPolucheniyaDannix.model // tyt tebe nado vzyat tvoi pravilnyi model dlya tekushego urovnya
  29. }
  30.  
  31. }
  32.  
  33. MoeOxuennoeTreeView
  34. {
  35. model: OtdelniyClassPolucheniyaDannix.model
  36.  
  37. delegate: Loader {
  38. // Gryzish delegate otnositelno tipa tvoego menu
  39. // ProstoiDelegate
  40. // SlojniyDelegate
  41. }
  42. }
  43.  
  44. }
  45.  
  46. int main() {
  47. // your code goes here
  48. // regestrirui OtdelniyClassPolucheniyaDannix dlya qml
  49. return 0;
  50. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:12:65: error: stray ‘`’ in program
   ... ustanavlivaem vse dannie u suem v nashi modeli, I NE ZABUD` ZA EMITY modeley
                                                                 ^
prog.cpp:5:1: error: expected class-name before ‘{’ token
 {
 ^
prog.cpp:6:2: error: expected unqualified-id before ‘...’ token
  ...
  ^~~
prog.cpp: In member function ‘void OtdelniyClassPolucheniyaDannix::ustanovitNovieDannie(void*)’:
prog.cpp:12:3: error: expected primary-expression before ‘...’ token
   ... ustanavlivaem vse dannie u suem v nashi modeli, I NE ZABUD` ZA EMITY modeley
   ^~~
prog.cpp: At global scope:
prog.cpp:20:2: error: ‘Text’ was not declared in this scope
  Text { text: "govno" }
  ^~~~
prog.cpp:20:7: error: expected ‘}’ before ‘{’ token
  Text { text: "govno" }
       ^
prog.cpp:20:7: error: expected ‘,’ or ‘;’ before ‘{’ token
prog.cpp:21:1: error: expected declaration before ‘}’ token
 }
 ^
stdout
Standard output is empty