Results 1 to 4 of 4

Thread: Help ComboBox

  1. #1

    Default Help ComboBox

    How do I get a window keep checking, while the window is open, the currentText a comboBox?

    For example:
    I have a ComboBox with: Driver and vehicle.
    If Driver is activated, without pressing any button, it addItems (getDriver). If vehicle is activated, without pressing any button, it updates automatic (getVehicle).

  2. #2
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: Help ComboBox

    Not sure if I understand what you want to achieve.

    Driver is activated (by the user ?), it adds one item (you could use the signal slot mechanism), or keep adding items until the user deactivate it? (you could use timmers)
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

  3. #3

    Default Re: Help ComboBox

    I want the program to detect the currentText enabled in ComboBox without pressing any button.
    For example:

    ComboBox
    ----- Driver
    ----- Vehicle

    If the vehicle is currentText I want the program calls a function. If the Driver is currentText I want him to call another function.

    But I want him to ALWAYS check alone currentText of the ComboBox.

  4. #4
    Join Date
    Aug 2008
    Location
    Algarve, Portugal
    Posts
    288
    Thanks
    23
    Thanked 32 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: Help ComboBox

    So your looking for void QComboBox::currentIndexChanged ( int index ) [signal]

    If you 're using qtcreator just right click in the combox, choose "go to slot".
    __________________________________________________
    My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
    Like my projects ? Buy me a kofi

Similar Threads

  1. Combobox with checkable items
    By qtneuling in forum Qt Programming
    Replies: 1
    Last Post: 5th July 2008, 14:42
  2. Replies: 2
    Last Post: 18th March 2008, 15:38
  3. ComboBox of bmp:s
    By SailinShoes in forum Qt Programming
    Replies: 2
    Last Post: 5th March 2008, 15:22
  4. [Qt 4.3.1]A problem with combobox style
    By Tamara in forum Qt Programming
    Replies: 3
    Last Post: 19th September 2007, 10:49
  5. Filling combobox from database
    By Philip_Anselmo in forum Qt Programming
    Replies: 3
    Last Post: 11th May 2006, 17:53

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.