Results 1 to 5 of 5

Thread: Delayed popup menu

  1. #1
    Join Date
    Dec 2006
    Posts
    9
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Delayed popup menu

    Hi;

    Press action button, popup menu 1 or 2 second later show
    how can fix this problem...

    Qt Code:
    1. drawMenu = new QMenu(this);
    2. drawMenu->addAction(tr("Line Object"));
    3. drawMenu->addAction(tr("Rectangle"));
    4. drawMenu->addAction(tr("Rounded rectangle"));
    5. drawMenu->addAction(tr("Ellipse"));
    6. drawMenu->addAction(tr("Triangle"));
    7. drawMenu->addAction(tr("Diamond"));
    8.  
    9. actionDraw->setMenu(drawMenu);
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Delayed popup menu

    Do you do anything when the triggered() signal for the action is emitted?

    Regards

  3. #3
    Join Date
    Dec 2006
    Posts
    9
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Delayed popup menu

    Quote Originally Posted by marcel View Post
    Do you do anything when the triggered() signal for the action is emitted?

    Regards


    No, I don't ...

    If only click to button don't show anything but press to hold 1 or 2 second show it ...

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Delayed popup menu

    What do you do with actionDraw. Do you put it in a toolbar?
    Because there is another way, designed specifically for that. See this post: http://www.qtcentre.org/forum/f-qt-p...ghlight=butcon

    regards

  5. #5
    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: Delayed popup menu

    Change the tool button popup mode to get the menu popup in a different way.
    J-P Nurmi

Similar Threads

  1. Popup menu for a QGraphicsItem?
    By Morea in forum Qt Programming
    Replies: 4
    Last Post: 4th February 2009, 21:27
  2. PopUp a Menu when showing FullScreen
    By Lele in forum Qt Programming
    Replies: 2
    Last Post: 29th May 2007, 10:04
  3. ListView Dynamic Popup menu
    By raphaelf in forum Newbie
    Replies: 3
    Last Post: 14th October 2006, 19:26
  4. Background image on popup menu item
    By MarkoSan in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 27th June 2006, 05:55
  5. Replies: 6
    Last Post: 14th April 2006, 05:39

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.