简体   繁体   中英

Tulip based Qt application only shows black screen. How do I get it to display properly?

After going through all of this , I ran into a completely separate problem.

The example standalone graph_display application now compiles and runs without crashing. Most of the functionality seems to look correct, however there is an issue.

Instead of showing the graph represented by the tlp file, I get a black screen.

It turns out that when you add nodes to a tulip graph, it places them all (dimensionally) in the same space.

Applying a layout will fix the issue of the graph only displaying a black box.

This can be done with a snippet of code like this:

Graph *g = tlp::loadGraph(argv[1]);
g->applyPropertyAlgorithm("Circular"
                        g->getProperty<LayoutProperty>("viewLayout"), 
                        message);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM