Comments (5)
Hi! Thanks for submitting the bug. It it strange that the hight is limited. I will have a look
from nodeeditor.
Could you please share the code where you construct the model's widget?
I can't reproduce the issue.
from nodeeditor.
The specific node I showed on my first post was dynamically generated, so there is no specific code I can give you to duplicate except the whole project. I thought that maybe my "dynamic node creation system" might be the one messing up with the graphics so I added the NaiveDataModel from the connection_colors example to my project and changed the "embeddedWidget" to this piece of code :
QWidget *
embeddedWidget() override { //return nullptr;
QFormLayout * layout = new QFormLayout;
for (int i = 0; i < 15; i++)
{
QLineEdit * le = new QLineEdit;
QString s = QString::number(i);
layout->addRow(s,le);
}
QWidget * widget = new QWidget;
widget->setLayout(layout);
widget->setMaximumSize(widget->sizeHint());
return widget;
}
I tried different styling options to be sure that it has nothing to do with it.
Here is another example with more rows :
Also, I'm doing this to set nodeeditor as the central widget of my main project, maybe it's where the problem comes from... :
NodeEditor::NodeEditor()
{
::setStyle();
scene = new FlowScene(registerDataModels());
this->view = new FlowView(scene);
}
QWidget *
NodeEditor::getWidget()
{
return ((QGraphicsView *)(this->view));
}
//NodeEditor is one of my class.
from nodeeditor.
Alright, that's not a bug, that's just me.
When I first wrote my function I took your calculator/NumberSourceDataModel.cpp as example where the widget creation is :
_lineEdit->setValidator(new QDoubleValidator());
_lineEdit->setMaximumSize(_lineEdit->sizeHint());
connect(_lineEdit, &QLineEdit::textChanged,
this, &NumberSourceDataModel::onTextEdited);
_lineEdit->setText("0.0");
So I also used setMaximumSize
to create my widget and got a wrong result.
I changed it to setMinimumSize
and got :
So I'm finally using :
widget->setMinimumHeight(widget->sizeHint().height());
widget->setMaximumWidth(widget->sizeHint().width());
from nodeeditor.
I guess one does not need to set the size explicitly. From what I know it works just fine with the automatically defined size. Anyway, nice that it finally works.
from nodeeditor.
Related Issues (20)
- :-1: error: ninja: build stopped: subcommand failed. HOT 1
- crashed when click twice on a no-connection-port of locked-node
- Qt dependency problem
- an extra "t" in JSON key "intNodeId" but named inNodeId in ConnectionId HOT 2
- Dynamic ports in v3
- how to save file which refer to flow id
- Drag and drop flow file HOT 1
- Missing or incorrect inputs text
- Embedded widget with wrong size when content has changed HOT 3
- NODE_EDITOR_SHARED added to target public definition HOT 2
- Item is Clipped Sometimes. HOT 2
- display a widget but location is wrong HOT 1
- The context menu of QLineEdit can not be closed
- how to change the Graphics style dynamically ?
- connect exception
- Get Warning "qt.core.qobject.connect: QObject::connect: signal not found in NodeDelegateModel" while using load *.dll method. HOT 2
- resizable_images Demo的双击事件无法捕获 HOT 1
- Big issue when using combo embedded widget HOT 2
- Connector selection issue
- Some usage issues.
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 nodeeditor.