Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我创建实现 QWidget、QGraphicsView、QGraphicsItem 等的类时...我总是只包含 QtGui 而不是 QtWidget、QGraphicsView 等...这是不好的做法吗?是否有任何性能成本?因为这个,构建时间会更长吗?
如果QtGui头文件包含所有其他头文件,那么编译时间会更长,因为编译器预处理器必须读取更多文件,并且编译器本身将有更多类/结构来解析和跟踪。但是,链接时间,更重要的是运行时间 不会受到影响。
QtGui