i dun think this will work with my current code. argh talking in forum is pretty hard man. i cant possible post my whole source code here.
do you have a msn or something? so i could end you my whole program. and u help me take a look?
i dun think this will work with my current code. argh talking in forum is pretty hard man. i cant possible post my whole source code here.
do you have a msn or something? so i could end you my whole program. and u help me take a look?
sorry man .. this is the best i can do...
oh man. i seriously need some help here. anybody?
no reply from anyone else?
I think that it is hard to give you some example because we don't know what is that yellow node. Is it some widget or what? A picture? Diagram in some other application? There are some signals in QLineEdit which you can use (like textChanged() ) so you can connect them to your slots, where you can check the current combo box selection and change proper node (yellow or any other you want). But how would I know how to change that yellow node? Paint it with QPainter or what?
I would like to be a "Guru"
Useful hints (try them before asking):
- Use Qt Assistant
- Search the forum
If you haven't found solution yet then create new topic with smart question.
That's a bad idea, because then all other board members can't learn from your problem.
We live in different time zones, so sometimes we have to sleep
And as to your question: It's also not very clear to me what you want to achieve: Change the yellow bubble text on the fly while typing in the line edit, or after the dialog has closed?
For the first, emit a signal from the dialog whenever the text changes. catch that in your main window and manipulate the corresponding node.
After closing the dialog use QComboBox::currentIndex() or QComboBox::currentText() to determinate the box. Either use switch or if/else unless you don't have stored your nodes in a QList etc.
okay first of all. to kickstart. i suppose i have to connect the combobox to the qlineEdit right?
i had look through the some examples and the QT Assistant. but i am still confuse of how to go about connecting it.
Come on, what's the problem QCombobox::currentIndexChanged(const QString&) -> QLineEdit::setText()! REad about signal and slot mechanism.
come on. i am very new to this QT library. i am dump to do this project for my Final Year of Diaploma. please be patience with me
hmm so i think your problem is quite simple:
1. You open a dialog with combo box and line edit
2. Then you edit this dialog and close it
3. After close you want to set the right bubble (yellow for example) with the right text.
Right?
If yes then:
1. If you have some custom dialog (your own subclass of QDialog) just make two methods for it: one to get the selected index and one to get the line edit text. I assume you use QDialog::exec() to open it, so after exec() just read those values and set the right bubble with right text calling your method which paints it (whith QPainter and so on).
2. If you have QDialog object and you set the ui to it (setupUi()) then you can get the values staight form ui object (Ui::SomeDialog).
I would like to be a "Guru"
Useful hints (try them before asking):
- Use Qt Assistant
- Search the forum
If you haven't found solution yet then create new topic with smart question.
Devoraz (27th July 2009)
Guys, just reminding you we're dealing with a school project here. Remember about our policy on helping with school projects - only hints, no ready solutions. The guy has to learn and based on the content of this lenghty thread, he needs it. Foremost the "concept of programming" is required. The programming language is just a tool.
Bookmarks