Results 1 to 4 of 4

Thread: Message box auto hidden!

  1. #1
    Join Date
    Oct 2011
    Posts
    10
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Message box auto hidden!

    Hello every one. I want to show Message box in 3 seconds, after that this message will auto hidden . Help me!

  2. #2
    Join Date
    Dec 2008
    Location
    Poland
    Posts
    383
    Thanks
    52
    Thanked 42 Times in 42 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Message box auto hidden!

    Try this:
    Qt Code:
    1. QTimer().singleShot( 3000, messageBox, SLOT(close()) );
    To copy to clipboard, switch view to plain text mode 
    In the near future - corporate networks reach out to the stars. Electrons and light flow throughout the universe.
    The advance of computerization however, has not yet wiped out nations and ethnic groups.

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

    phuong_90 (7th November 2011)

  4. #3
    Join Date
    Oct 2011
    Posts
    10
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Message box auto hidden!

    Thank Talel for your guide. I have an other question. I have a QPushButton button and I add Icon for it from a .qrc file. the image has a name. In my code I setup
    the slot click() for button
    Qt Code:
    1. void Image::on_button_clicked()
    2. {
    3. QString image_name=ui->p1->icon().name();
    4. }
    To copy to clipboard, switch view to plain text mode 
    to get name of icon. But image_name is empty. you can tell me about why it is?

  5. #4
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Message box auto hidden!


Similar Threads

  1. hidden a QTreeWidgetItem
    By mattia in forum Newbie
    Replies: 6
    Last Post: 19th February 2014, 14:04
  2. Replies: 4
    Last Post: 12th October 2008, 13:47
  3. How to display hidden files ?
    By merry in forum Qt Programming
    Replies: 1
    Last Post: 16th September 2008, 12:27
  4. QFileDialog hidden files
    By blukske in forum Qt Programming
    Replies: 3
    Last Post: 8th March 2007, 02:11
  5. Hidden field in QTreeView
    By YuriyRusinov in forum Qt Programming
    Replies: 4
    Last Post: 30th June 2006, 12:00

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.