some (but not all) compatibility changes for qt 4.6
This commit is contained in:
parent
f4c52b8178
commit
fb61b442ca
3 changed files with 24 additions and 22 deletions
|
@ -31,9 +31,7 @@ void HandZone::paint(QPainter *painter, const QStyleOptionGraphicsItem */*option
|
|||
|
||||
void HandZone::reorganizeCards()
|
||||
{
|
||||
if (cards.isEmpty())
|
||||
return;
|
||||
|
||||
if (!cards.isEmpty()) {
|
||||
const int cardCount = cards.size();
|
||||
qreal totalWidth = boundingRect().width();
|
||||
qreal totalHeight = boundingRect().height();
|
||||
|
@ -55,6 +53,8 @@ void HandZone::reorganizeCards()
|
|||
c->setZValue(i);
|
||||
}
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
void HandZone::addCardImpl(CardItem *card, int x, int /*y*/)
|
||||
{
|
||||
|
|
|
@ -73,6 +73,7 @@ void TableZone::handleDropEventByGrid(int cardId, CardZone *startZone, const QPo
|
|||
|
||||
void TableZone::reorganizeCards()
|
||||
{
|
||||
update();
|
||||
}
|
||||
|
||||
void TableZone::toggleTapped()
|
||||
|
|
|
@ -127,6 +127,7 @@ void ZoneViewZone::removeCard(int position)
|
|||
|
||||
void ZoneViewZone::setGeometry(const QRectF &rect)
|
||||
{
|
||||
prepareGeometryChange();
|
||||
setPos(rect.topLeft());
|
||||
height = rect.height();
|
||||
reorganizeCards();
|
||||
|
|
Loading…
Reference in a new issue