Page 2 of 4 FirstFirst 1234 LastLast
Results 21 to 40 of 66

Thread: linking of combox with lineEdit.

  1. #21
    Join Date
    Jul 2009
    Posts
    55
    Thanks
    3

    Post Re: linking of combox with lineEdit.

    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

  2. #22
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: linking of combox with lineEdit.

    Quote Originally Posted by Devoraz View Post
    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
    then first of all stop using words that made us think you are exp. And use the newbie section..

  3. #23
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: linking of combox with lineEdit.

    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):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  4. The following user says thank you to faldzip for this useful post:

    Devoraz (27th July 2009)

  5. #24
    Join Date
    Jul 2009
    Posts
    55
    Thanks
    3

    Default Re: linking of combox with lineEdit.

    faldzip. i dont know how to get the selected index of the combobox.

  6. #25
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: linking of combox with lineEdit.


  7. #26
    Join Date
    Jul 2009
    Posts
    55
    Thanks
    3

    Default Re: linking of combox with lineEdit.

    can i have an example of code for me try out or something.

  8. #27
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: linking of combox with lineEdit.

    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...

  9. #28
    Join Date
    Jul 2009
    Posts
    55
    Thanks
    3

    Default Re: linking of combox with lineEdit.

    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?

  10. #29
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: linking of combox with lineEdit.

    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..

  11. #30
    Join Date
    Jul 2009
    Posts
    55
    Thanks
    3

    Default Re: linking of combox with lineEdit.

    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"

  12. #31
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: linking of combox with lineEdit.

    Quote Originally Posted by Devoraz View Post
    can i have an example of code for me try out or something.
    There are a lot of examples in Qt Examples & Demos, and a lot of descriptions of methods, classes and everything in Qt Assistant. Just run it and read some text!
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  13. #32
    Join Date
    Jul 2009
    Posts
    55
    Thanks
    3

    Default Re: linking of combox with lineEdit.

    alright i will use the example codes to try.

  14. #33
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: linking of combox with lineEdit.

    Quote Originally Posted by Devoraz View Post
    alright. i will try doing it.
    thats the way to go!!

    but QT is not like C#, when i create the GUI. i can program it by double clicking it.
    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.

    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"
    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.
    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...

  15. #34
    Join Date
    Jul 2009
    Posts
    55
    Thanks
    3

    Default Re: linking of combox with lineEdit.

    but the GUI of this project i have is programmed using Qt by Texas Instruments. so i have no choice but to program using Qt...

  16. #35
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: linking of combox with lineEdit.

    so better start learning now...

  17. #36
    Join Date
    Jul 2009
    Posts
    55
    Thanks
    3

    Default Re: linking of combox with lineEdit.

    ya damn. if its in C# it will be much much more easier i guess. lol

    and i only have 4 weeks left. -_-! i had almost complet my project. this last part is the worst. i manage to slove many of it myself. Qt.... its really nice but really hard -_-!

  18. #37
    Join Date
    Jul 2009
    Posts
    55
    Thanks
    3

    Default Re: linking of combox with lineEdit.

    alright MrDeath. if this question is a yes. i might be able to make what i wan in a simple but not very professional way. lol.

    can i have a QLineEdit on top of my Qpainter?

  19. #38
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: linking of combox with lineEdit.

    QPainter is a brush which is used to paint on a widget. A widget can have other widgets inside it. So if i understood you correctly... yes you can paint your widget and also have a lineedit on top of it somewhere.

    but really brother... please at least spent a day on qt tutorial... you will be gald you did.

  20. #39
    Join Date
    Jul 2009
    Posts
    55
    Thanks
    3

    Default Re: linking of combox with lineEdit.

    ahaha. yes. i am doing it right now in the Qt Assistant with the address book tutorial.

    hopefully at the end of it, it will help me someways.

    thanks MrDeath. haha. i will come back to you for more question. =)

  21. #40
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: linking of combox with lineEdit.

    our "Gurus" can give you more good answers than me

Similar Threads

  1. Qt linking problem
    By LovesTha in forum Newbie
    Replies: 3
    Last Post: 31st March 2009, 00:31
  2. How to update lineEdit
    By HelloDan in forum Qt Programming
    Replies: 9
    Last Post: 17th February 2009, 08:01
  3. Copy / Paste doesn't work with LineEdit
    By ia32 in forum Qt Tools
    Replies: 2
    Last Post: 5th May 2008, 22:44
  4. Replies: 4
    Last Post: 20th February 2006, 10:11
  5. subclassing or redrawing a lineEdit
    By jayw710 in forum Qt Programming
    Replies: 2
    Last Post: 7th February 2006, 19:26

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.