Changeset 10 in tspsg-svn for trunk/src/settingsdialog.cpp


Ignore:
Timestamp:
Oct 19, 2007, 3:41:00 AM (17 years ago)
Author:
laleppa
Message:

Now label hint (and Settings Dialog) aren't resized when text changes from one-line to two-line and vice versa.
This is a hack! Any better solution?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/settingsdialog.cpp

    r9 r10  
    3636        setWindowFlags(windowFlags() ^ Qt::WindowContextHelpButtonHint);
    3737        layout()->setSizeConstraint(layout()->SetFixedSize);
    38         // Setting initial text of dialog hint label to own status tip text
     38        // Setting initial text of dialog hint label to own status tip
     39        // text.
    3940        labelHint->setText(labelHint->statusTip());
     41        // HACK: Do not resize label hint (and dialog) when text changes
     42        // from one-line to two-line and vice versa. Any better solution?
     43        labelHint->setMaximumHeight(labelHint->height());
     44        labelHint->setMinimumHeight(labelHint->height());
    4045}
    4146
     
    4449        // Checking for StatusTip event and if tip text is not empty string
    4550        // setting it as text of the dialog hint label. Otherwise, setting
    46         // dialog hint label text to own status tip text
     51        // dialog hint label text to own status tip text.
    4752        if (ev->type() == QEvent::StatusTip) {
    4853QString tip = static_cast<QStatusTipEvent *>(ev)->tip();
Note: See TracChangeset for help on using the changeset viewer.