mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 07:31:33 +08:00
Fixed wrong pixmap is null test in ElidingLabel
This commit is contained in:
parent
8d14068df7
commit
0312682e07
@ -164,11 +164,11 @@ void CElidingLabel::resizeEvent(QResizeEvent *event)
|
||||
QSize CElidingLabel::minimumSizeHint() const
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
bool NoPixmap = pixmap().isNull();
|
||||
bool HasPixmap = !pixmap().isNull();
|
||||
#else
|
||||
bool NoPixmap = (pixmap() == nullptr);
|
||||
bool HasPixmap = (pixmap() != nullptr);
|
||||
#endif
|
||||
if (NoPixmap || d->isModeElideNone())
|
||||
if (HasPixmap || d->isModeElideNone())
|
||||
{
|
||||
return QLabel::minimumSizeHint();
|
||||
}
|
||||
@ -186,11 +186,11 @@ QSize CElidingLabel::minimumSizeHint() const
|
||||
QSize CElidingLabel::sizeHint() const
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
bool NoPixmap = pixmap().isNull();
|
||||
bool HasPixmap = !pixmap().isNull();
|
||||
#else
|
||||
bool NoPixmap = (pixmap() == nullptr);
|
||||
bool HasPixmap = (pixmap() != nullptr);
|
||||
#endif
|
||||
if (NoPixmap || d->isModeElideNone())
|
||||
if (HasPixmap || d->isModeElideNone())
|
||||
{
|
||||
return QLabel::sizeHint();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user