Results 1 to 2 of 2

Thread: qinputdialog strange behaviour

  1. #1
    Join Date
    Feb 2008
    Posts
    102
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question qinputdialog strange behaviour

    I use the static method

    Qt Code:
    1. QInputDialog::getText ( QWidget * parent, const QString & title, const QString & label,
    2. QLineEdit::EchoMode mode = QLineEdit::Normal,
    3. const QString & text = QString(), bool * ok = 0, Qt::WindowFlags f = 0 )
    To copy to clipboard, switch view to plain text mode 

    I use it, into a slot. This slot is called, when an action emits the triggered() signal. This Action is activated in a contextmenu.

    The strange behaviour, is that the slot is called two times for each mouse press........i have other slots in the same contextmenu that work well.
    Last edited by jacek; 24th May 2008 at 16:07. Reason: wrapped too long line

  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: qinputdialog strange behaviour

    Make sure that you don't establish the connection twice by accident (for example in a loop) and that the slot is not using the naming convention of automatic connections:
    void on_<widget name>_<signal name>(<signal parameters>);
    J-P Nurmi

Similar Threads

  1. Expanding textedit field strange behaviour
    By vieraci in forum Qt Programming
    Replies: 22
    Last Post: 26th October 2007, 08:08
  2. Strange Painter behaviour
    By cwomeijer in forum Qt Programming
    Replies: 2
    Last Post: 4th September 2006, 20:52
  3. very strange behaviour
    By regix in forum Qt Programming
    Replies: 23
    Last Post: 20th July 2006, 17:38
  4. Replies: 1
    Last Post: 26th February 2006, 05:52
  5. [Qt 4.1] Strange behaviour with QTableView
    By fane in forum Qt Programming
    Replies: 1
    Last Post: 23rd January 2006, 06:17

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.