Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. What is the relative path to my default project directory
Forum Updated to NodeBB v4.3 + New Features

What is the relative path to my default project directory

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 308 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AI_Messiah
    wrote on last edited by
    #1

    I have been looking for answers to this it seems like it is to simple for someone to cover so I cannot find it. the thing is when I try to do some thing like:

    m_texture->setData(QImage(":/hpdefault.jpg"));
    

    the program crashes on that line.

    JonBJ 1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @AI_Messiah said in What is the relative path to my default project directory:

      the program crashes on that line.

      Don't know what a crash should have to do with 'What is the relative path to my default project directory' but when it crashes you should check if m_texture is valid (for sure it's not)

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      2
      • A AI_Messiah

        I have been looking for answers to this it seems like it is to simple for someone to cover so I cannot find it. the thing is when I try to do some thing like:

        m_texture->setData(QImage(":/hpdefault.jpg"));
        

        the program crashes on that line.

        JonBJ Online
        JonBJ Online
        JonB
        wrote on last edited by
        #3

        @AI_Messiah
        Check what is the value of m_texture.
        Check the value of QImage(":/hpdefault.jpg").isNull().
        Check the value of QFileInfo(":/hpdefault.jpg").

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Beside the points of my fellows, did you properly create a resource since you are using their path ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved