Results 1 to 9 of 9

Thread: QComboBox as a trigger

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2007
    Posts
    33
    Thanks
    7
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QComboBox as a trigger

    Ok i guess i do understand the basic idea now a bit better.

    My first test does not work, but i guess that has something to do with my implementation.

    Qt Code:
    1. void MainWindow::showPopup()
    2. {
    3. // re-Init-Section
    4. // ....
    5. // ....
    6. // end- re-Init Section
    7.  
    8. QComboBox::showPopup();
    9. }
    To copy to clipboard, switch view to plain text mode 

    Error:
    mainwindow.cpp:350: error: cannot call member function `virtual void QComboBox::showPopup()' without object

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QComboBox as a trigger

    Quote Originally Posted by ape View Post
    Error:
    mainwindow.cpp:350: error: cannot call member function `virtual void QComboBox::showPopup()' without object
    You must subclass QComboBox. You cannot implement its method to another class eg. MainWindow.
    Qt Code:
    1. class MyComboBox : public QComboBox
    2. {
    3. ...
    4. };
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    ape (4th February 2008)

  4. #3
    Join Date
    Dec 2007
    Posts
    33
    Thanks
    7
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QComboBox as a trigger

    ok i guess i got it.

    Thanks again for your nice help jpn.

Similar Threads

  1. QComboBox
    By coderbob in forum Qt Programming
    Replies: 4
    Last Post: 12th December 2007, 06:38
  2. QComboBox drop list button events
    By maird in forum Qt Programming
    Replies: 5
    Last Post: 20th October 2007, 19:25
  3. QComboBox in QTableWidget : display troubles.
    By Nyphel in forum Qt Programming
    Replies: 2
    Last Post: 13th October 2007, 23:29
  4. using QComboBox as an ItemView
    By EricTheFruitbat in forum Qt Programming
    Replies: 3
    Last Post: 24th January 2007, 16:14
  5. QDataWidgetMapper <=> QComboBox best practice
    By saknopper in forum Qt Programming
    Replies: 1
    Last Post: 18th January 2007, 10:50

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
  •  
Qt is a trademark of The Qt Company.