Results 1 to 12 of 12

Thread: toolTips?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: toolTips?

    This should help you:
    void QStatusBar::message ( const QString & message ) [slot]
    Hides the normal status indicators and displays message until clear() or another message() is called.
    See also clear().
    Example: regexptester/regexptester.cpp.

  2. #2
    Join Date
    Jan 2006
    Posts
    976
    Qt products
    Qt3
    Platforms
    Windows
    Thanks
    53

    Default Re: toolTips?

    I don't like hide normal status. I'd like have a normal status text and a blocked text in the center of status bar (not on the left)....
    Regards

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: toolTips?

    Then insert a label into the status bar and display there.

  4. #4
    Join Date
    Jan 2006
    Posts
    976
    Qt products
    Qt3
    Platforms
    Windows
    Thanks
    53

    Default Re: toolTips?

    I prove to insert a label in status bar from designer but it seems impossible..
    Regards

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: toolTips?

    Not everything can be done from Designer. You have to do that in init() or in subclass constructor.

  6. #6
    Join Date
    Jan 2006
    Posts
    976
    Qt products
    Qt3
    Platforms
    Windows
    Thanks
    53

    Default Re: toolTips?

    Hi, I insert this in ini costructor:
    Qt Code:
    1. statusBar()->addWidget (statusLabel,110,FALSE);
    To copy to clipboard, switch view to plain text mode 
    It works but the problem is wheen mouse is over action my label is replaced with tooltips....When I move out action my label appears...
    Regards

  7. #7
    Join Date
    Jan 2006
    Location
    N.B. Canada
    Posts
    47
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanked 8 Times in 7 Posts

    Default Re: toolTips?

    Lets see...

    void QStatusBar::addWidget ( QWidget * widget, int stretch = 0, bool permanent = FALSE ) [virtual]
    Adds widget to this status bar. widget is reparented if it isn't already a child of the QStatusBar.
    widget is permanently visible if permanent is TRUE and may be obscured by temporary messages if permanent is FALSE. The default is FALSE.

    If permanent is TRUE, widget is located at the far right of the status bar. If permanent is FALSE (the default), widget is located just to the left of the first permanent widget.

    stretch is used to compute a suitable size for widget as the status bar grows and shrinks. The default of 0 uses a minimum of space.

    This function may cause some flicker.


    See also removeWidget().
    The march of progress:
    C:
    printf("%10.2f", x);
    C++:
    cout << setw(10) << setprecision(2) << showpoint << x;
    Java:
    java.text.NumberFormat formatter = java.text.NumberFormat.getNumberInstance();
    formatter.setMinimumFractionDigits(2);
    formatter.setMaximumFractionDigits(2);
    String s = formatter.format(x);
    for (int i = s.length(); i < 10; i++) System.out.print(' ');
    System.out.print(s);

  8. #8
    Join Date
    Jan 2006
    Posts
    976
    Qt products
    Qt3
    Platforms
    Windows
    Thanks
    53

    Default Re: toolTips?

    It's works. But every change below dosn't take place (setweight,bold...).Why?
    Qt Code:
    1. statusLabel = new QLabel (this);
    2. QFont f2( "Arial");
    3. f2.setBold(TRUE);
    4. f2.setWeight(16);
    5. statusLabel->setFont(f2);
    To copy to clipboard, switch view to plain text mode 
    Regards

Similar Threads

  1. Problems customizing tooltips in QListView
    By kalos80 in forum Qt Programming
    Replies: 6
    Last Post: 14th November 2007, 23:46
  2. Turning off ToolTips
    By steg90 in forum Qt Programming
    Replies: 11
    Last Post: 16th May 2007, 18:00
  3. Tooltips for QListViewItems (QT3)?
    By gadnio in forum Newbie
    Replies: 3
    Last Post: 13th March 2006, 18:02
  4. Tooltips on QActions
    By drhex in forum Newbie
    Replies: 1
    Last Post: 8th February 2006, 19:05
  5. Tooltips & Qt4 tree views
    By yogeshm02 in forum Newbie
    Replies: 7
    Last Post: 17th January 2006, 16:12

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
  •  
Qt is a trademark of The Qt Company.