Results 1 to 2 of 2

Thread: Handling mouseevent in Qstatusbar .

  1. #1
    Join Date
    May 2012
    Location
    India
    Posts
    51
    Thanks
    4
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows

    Default Handling mouseevent in Qstatusbar .

    In my statusbar , i have added one Qlabel inside which i am displaying some message . Now what i want is when i click on that Qlabel(present inside the Qstatusbar ) , the message should disappear ..

    I have added the label inside statusbar as follows ,

    Qt Code:
    1. QLabel *cpyrightlbl= new QLabel();
    2. ui.statusBar->addWidget(cpyrightlbl);
    3. cpyrightlbl->setText("Demo Message");
    4. cpyrightlbl->setStyleSheet("border: 3px");
    5. cpyrightlbl->setFixedWidth(frameGeometry().width());
    6. cpyrightlbl->show();
    To copy to clipboard, switch view to plain text mode 
    Last edited by high_flyer; 12th July 2012 at 10:29. Reason: code tags

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Handling mouseevent in Qstatusbar .

    What is the problem you are having? (its not the same as what you want to achieve)
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. MouseEvent and colors
    By arubagirl in forum Newbie
    Replies: 1
    Last Post: 15th April 2011, 09:24
  2. mouseEvent with two mice
    By yun in forum Newbie
    Replies: 0
    Last Post: 6th May 2009, 10:25
  3. problem in mouseEvent
    By wagmare in forum Qt Programming
    Replies: 7
    Last Post: 9th April 2009, 06:20
  4. MouseEvent on QTextEdit
    By Sarma in forum Qt Programming
    Replies: 14
    Last Post: 10th March 2006, 09:49
  5. MouseEvent & QTextEdit
    By Sarma in forum Qt Programming
    Replies: 2
    Last Post: 7th March 2006, 23:06

Tags for this Thread

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.