mapeditor/tiled

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Tiled displays tilesets wrongly with qt 6.9 #4191

NetSysFire posted onGitHub

Describe the bug

See title. thorbjorn confirmed on IRC this is apparently related to qt 6.9. A solution would be using the appimage or flatpak for now apparently.

To Reproduce

  1. Use qt 6.9
  2. Run tiled.
  3. Open any tileset. It is worse with lower zoom levels and with a higher zoom level, the tiles overlap. These tiles are 16x16.
  4. See below.

Image

Expected behavior

It would display them as usual.

Specifications:

  • OS: Arch Linux
  • Tiled Version: 1.11.2-1

Arch updated Qt6 from 6.8.x to 6.9, but the Tiled in the repo is still built against Qt 6.8.x. I tried re-building Tiled 1.11.2 from git locally with Qt 6.9 and the issue went away.

posted by sircodalotkob 13 days ago

Hmm, that's odd because I could reproduce this issue when compiling Tiled against Qt 6.9 installed through the Qt Online Installer.

posted by bjorn 12 days ago

Odd, indeed... To be sure, I checked again.

/usr/bin/tiled (from Manjaro Linux Repo):

Image

/usr/local/bin/tiled (tag v1.11.2 from Github, built using qbs):

Image

posted by sircodalotkob 12 days ago

@sircodalotkob Could you confirm whether your Qbs build of Tiled is indeed using Qt 6.9, for example by typing tiled.qtVersion in the Console view?

posted by bjorn 9 days ago

@bjorn Good hunch! Aside from Qt6, I still happen to have an old Qt5 installed, and that's what qbs chose for the build. Sorry for the confusion.

I tried to build again, this time against Qt 6.9.0, but it fails and I get this:

[…]/src/libtiled/qtcompat_p.h:31:7: error: conflicting declaration ‘using QStringRef = class QStringView’
[…]
/usr/include/qt6/QtCore/qstringfwd.h:39:7: note: previous declaration as ‘class QStringRef’
   39 | class QStringRef; // defined in qt5compat
posted by sircodalotkob 9 days ago

I tried to build again, this time against Qt 6.9.0, but it fails and I get this:

The Tiled 1.11.2 release needs this patch to compile against Qt 6.8.2 and up: https://github.com/mapeditor/tiled/commit/60388da00ef8e64608c581369b5c68e85162e31d

However I'd recommend to check out the repository instead, using either the master or 1.11 branch.

posted by bjorn 8 days ago

I can confirm the tileset view looks as intended when building Tiled against Qt 5.15.18 and Qt 6.8.3. Built against Qt 6.9.0, the tileset view doesn't re-layout it's cells anymore, leading to the effect the OP described.

posted by sircodalotkob 4 days ago

@bjorn any chance you could look into this? tiled is currently pretty gnarly to use on Arch.

posted by svenstaro 1 day ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests