所以我要把我的笔记本电脑从窗户扔出去,从窗户上出来,去烧掉苹果总部。
请参阅下面的更新:
我无法让python3,boost-python和clang相互配合。我遇到的错误正在运行:
clang++ <FLAGS/INCLUDES> -o hello.so hello.cpp
Run Code Online (Sandbox Code Playgroud)
调用响应:
Undefined symbols for architecture x86_64:
"__Py_NoneStruct", referenced from:
boost::python::api::object::object() in hello-0c512e.o
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [hello] Error 1
Run Code Online (Sandbox Code Playgroud)
任何帮助将不胜感激。我想我已经包括了所有必要的内容。让我知道您是否需要其他信息。
设置:
brew install python3which python -> / usr / bin / pythonbrew install boost …如果我构造一个QStandardItem这样的:
item = QtGui.QStandardItem('Item Name')
Run Code Online (Sandbox Code Playgroud)
当这个项目被添加到一个QStandardItemModel模型并在一个模型中查看时,QTreeView我得到一个单元格,上面写着Item Name. 但是,当我构建一个像:
item = QtGui.QStandardItem()
item.setData(123)
Run Code Online (Sandbox Code Playgroud)
我得到一个空单元格,但我仍然可以通过调用来调用数据:
print(item.data())
Run Code Online (Sandbox Code Playgroud)
我会得到号码123。如何让数字实际显示在单元格中?