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. Qt ressource files dont get compiled - how to manual
Qt 6.11 is out! See what's new in the release blog

Qt ressource files dont get compiled - how to manual

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 394 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.
  • C Offline
    C Offline
    cl90
    wrote on last edited by
    #1

    Hi.

    My Qt SDK does not compile my .qrc file when i hit run.
    So how can i compile it manualy?
    i tried: "rcc res.qrc" in cmd but it did no work, or did not create the files which should be generated.

    Rest of Information:
    Qt 5.2.1 on Win7

    This is my .pro:
    #————————————————————————-

    Project created by QtCreator 2015-02-25T16:00:14
    

    #————————————————————————-

    QT += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = qtico
    TEMPLATE = app

    SOURCES += main.cpp\ qtico.cpp

    HEADERS += qtico.h

    FORMS += qtico.ui

    RESOURCES += \ res.qrc

    ###########################################
    This is my res.qrc File:

    <RCC>
    <qresource prefix=”/”> <file>logo.png</file> <file>icon.ico</file>
    </qresource>
    </RCC>

    #########################################
    This is the code which should load the logo from the ressource:

    QImage image(“qrc:/logo.png”); if(!image.isNull()) { ui->label->setPixmap(QPixmap::fromImage(image)); ui->label->show(); }

    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