3
有了這個代碼:爲什麼gtkmm行get_value不起作用?
size = 100;
uint64_t work;
row.get_value(3, work);
cout << "value was " << work << endl;
work += size;
cout << "value set to " << work << endl;
row.set_value(3, work);
row.get_value(3, work);
cout << "value now " << work << endl;
我希望這樣的輸出:
value was 0
value set to 100
value now 100
,但我得到:
value was 0
value set to 100
value now 0
更新值,100,正確不顯示在樹視圖控件,我無法用get_value讀取它。我究竟做錯了什麼?
查看'set_value()'的文檔;你確定'row'仍然指向同一行嗎? – andlabs