Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Show QMenu after a while
Forum Updated to NodeBB v4.3 + New Features

Show QMenu after a while

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 516 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ivanicyI Offline
    ivanicyI Offline
    ivanicy
    wrote on last edited by
    #1

    Hello!!

    I am trying to show a menu, activated with a QPushButton. I want to press the button and, after 2 seconds, show a QMenu. How can I do this?

    Thank you very much!

    Taz742T 1 Reply Last reply
    0
    • ivanicyI ivanicy

      Hello!!

      I am trying to show a menu, activated with a QPushButton. I want to press the button and, after 2 seconds, show a QMenu. How can I do this?

      Thank you very much!

      Taz742T Offline
      Taz742T Offline
      Taz742
      wrote on last edited by Taz742
      #2

      @ivanicy
      You can use QTimer.
      http://doc.qt.io/qt-5/qtimer.html#singleShot-prop

      QTimer::singleShot(2000, this, [=]{
          //open a window
      });
      

      You registered on this forum JOINED 9 FEB 2017, Have not used QTimer yet? :D.

      Do what you want.

      1 Reply Last reply
      5

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved