Come on, what's the problem QCombobox::currentIndexChanged(const QString&) -> QLineEdit::setText()! REad about signal and slot mechanism.
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)
faldzip. i dont know how to get the selected index of the combobox.
can i have an example of code for me try out or something.
brother... just for two minutes try to put yourself in our shoes.. first of all we still dont know what is your exact problem.. secondly you dont seem to be intrested in showing a bit your your code.. thirdly .. you dont know how to use the currentIndex...
seriously... i really doubt your exp. in programming... Did you jumped directly to Qt before learning C++ or flow charts even?? ... I dont want to be harsh.. but you would do yourself a favour if you start reading more of assistant.
or you can wait for our gurus for answers... i am out of luck...
MrDeath. yes i understand. dun doubt my programming. i got all A for my programming module for my diaploma course. i've learn c# c++ htm and mp 8051.
but the problem here is QT library. i am really totally new to it. i am dump with this project for my Final Year Project. i myself is really struggling. i had done alot of change to my GUI.
if i were to show my codes. its a whole lot of things to show =X
i did try to understant the assistant. but it didnt work. i am doing this project on my own, my only hope is you guys from forum.
really need the help. alright. so what izzit that you dun understand of my problems?
ok... the very first process of solving a problem is to isolate it from the rest of the program.
please make a very small compilable program which reproduces your problem. I will not take more than 30 min to make one..
alright. i will try doing it.
but QT is not like C#, when i create the GUI. i can program it by double clicking it.
as for QT, when i use Qt Designer. i could only create the GUI. how do i start programming it. at the very least how do i make the main.cpp to start the "project"
thats the way to go!!
C# can only be used on windows... Qt is everywhere.. C# programs are at least 10 times slower than Qt(C++).. this is the trade off between speed and ease.but QT is not like C#, when i create the GUI. i can program it by double clicking it.
now i uderstood your problem... so you have not yet made any program in Qt. Take my advice.. forget about Qt Designer... first try to learn how to code everything by hand written c++. Fire up Qt assistant and look for tutorial.. This is a 10-15 chapter long tutorial which will make you just about good in Qt and you will love it.as for QT, when i use Qt Designer. i could only create the GUI. how do i start programming it. at the very least how do i make the main.cpp to start the "project"
If you are in a hurry to make your project its better to make it in C# coz you already know it... remember one thing.. we can only give hints.. nobody can program for you.. and you have at least know the basics of Qt, so that what we try to explain you is understood by you...
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.
alright i will use the example codes to try.
Bookmarks