Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-59132

Support for external resource loading via path strings for custom widgets in Designer

    XMLWordPrintable

Details

    Description

      The request is about adding support for loading external resources for custom widgets in Designer.

      Use case in more detail:

      • There's a custom widget plugin that displays an image. The path to the image is provided as QString property e.g. ":/path/to/TestImage.png".
      • The image is provided in resource file (attached to the form) by the user of that custom widget .

      Currently with this setup when the custom widget is first created by Designer, the constructed QPixmap with the path provided as QString results in an invalid pixmap (isNull() == true).
      If setting the image path is delayed e.g. with QTimer it will work and the image is shown properly.

      Steps to reproduce:

      • Build qtbug59132, run make install in the PluginTest
      • Run the application: Note both images show
      • Open PluginTestApp/mainwindow.ui in Designer. Note: below image does not show

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jkobus Jarek Kobus
            kileppal Kimmo Leppälä
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes