Comments (4)
Hey
This looks awesome :)
I send you a small pull request 5k3105/AM#1
I just made the items invisible (QGraphicsItem.SetVisible(false)
), before removing them.
And because sometimes I got those warnings: QGraphicsScene::removeItem: item 0x55217150's scene (0x0) is different from this scene (0xa5aa230)
, I added a simple check to make sure the QGraphicsItem.Scene() is not nil.
IIRC you are developing on windows and therefore won't see these warnings, because you got no visible command-line/shell/terminal?
Also as stated here http://doc.qt.io/qt-5/qgraphicsscene.html#removeItem, you are responsible to destroy the QGraphicsItems with DestroyQGraphicsItem()
if you don't need them any longer. (But unfortunately it always crashed after I added those calls, so I kept them out of the pull request)
Btw, I'm curious what are you planning to use the graph editor for?
from qt.
Oh wow! Thanks again therecipe!
Yes, I'm on windows.
Graph editor will be used as a front end to generate an xml file for a python multiprocessing pipeline someone else wrote here at work. So current plan is to only generate xml. I hope to use it for a lot of other things though. I tried to make the node/graph separate from the figures drawn on the canvas but I'm not sure I've got the abstractions right for Go. I spent so much time thinking about it I ended up reinventing a feature for Go someone else proposed 2 years ago (https://groups.google.com/forum/#!searchin/golang-nuts/why$20do$20interfaces$20not$20describe$20properties%7Csort:date/golang-nuts/ZJ5DEv_36S8/ZgADJo061JkJ). It was never implemented though ;/
I think I might have over-abstracted.
Open to any and all suggestions.
from qt.
Hey
I'm busy for the next few days, but I will look into it asap.
And based on what I saw it looks good.
from qt.
Hey
I looked into it again and concerning the separation of the node from the figures, you probably meant this part?
type Figure interface {
GetX() float64
SetX(x float64)
GetY() float64
SetY(y float64)
GetNode() *graph.Node
AddEdgeIncoming(l Link)
AddEdgeOutgoing(l Link)
// RemoveEdge()
}
Its unfortunately necessary to write own getter/setter functions, so there is nothing wrong with that.
And overall it looks good.
Btw, if you update to a6a0643 or later you will get this error:
controlbox/moc.go:56: NewControlbox redeclared in this block
previous declaration at controlbox/controlbox.go:20
Because qtmoc is now invoked on all sub-dirs (and there will be a lot of new moc* files).
from qt.
Related Issues (20)
- not use vendor dictionary
- new version of golang compiler is no longer support cmd "go get", can update readme helper ?
- Hello! I have a problem
- deploying linux to windows build fail with newqwebengineview. thanks for your help HOT 4
- Is alive? HOT 1
- Issue with using *QFileDialog.SelectedFiles(), "interface conversion: interface {} is []interface {}, not []string" HOT 1
- /usr/bin/ld: i386 architecture of input file `/tmp/go-link-3590783856/000000.o' is incompatible with i386:x86-64 output HOT 2
- Is there an active fork of this project? HOT 7
- android APK crashes when launched
- Installation fails for Qt 6 HOT 2
- !!! Read before opening a new issue !!!
- qtdeploy may not work with Go1.20 HOT 1
- go: warning: "github.com/therecipe/qt/cmd/..." matched no packages HOT 1
- menu.Actions() panics
- How to add a property sheet file to Qt
- How can I deploy a program to an arm development board and don't see a good way
- Intermittent Qtdeploy Failures HOT 1
- Gave up - Docs need some work for new people HOT 1
- is this project still maintains, what's the latest qt version does it support HOT 2
- qtsetup fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qt.