Qt Creator: Where's the Resource Browser?



  • I've just started using Qt Creator 2.0.1 on Linux (Ubuntu) and I'm struggling to understand how to manage UI resources through Qt Designer.

    I'm reading the "online docs ":http://doc.trolltech.com/4.7/designer-resources.html which explains how to define and edit a resource file in Qt Designer.

    The trouble is that I can't locate the Resource Browser - the docs state that I need to:

    bq. "enable the resource editor by opening the Tools menu, and switching on the Resource Browser option."

    but I don't have any such option in the Tools menu.

    If anyone can point me in the right direction, I'd really appreciate it.

    Thanks.



  • Qt Creator and Qt Designer are different tools. To edit resource in Qt Creator you simply need to open it as any other file.



  • Thanks for the response but I'm still confused.

    What tool am I using in Qt Creator to design GUI forms? I thought that was Qt Designer. The Qt Creator help seems to imply that's what I'm using.

    EDIT: I just re-read the Qt Creator tutorial and I am using Qt Designer which is embedded in Qt Creator, so the original question still stands.



  • Qt Creator has a built-in designer plugin. Just double click on a .ui file and the respective view will show up.



  • Thanks Volker, I have that but I can't figure out where the Resource Browser might be (see original post).



  • The UI files are NOT managed with the resource browser but with the project browser. You will not add the .ui files to the resource system (.qrc files).



  • Ok, I'm really new to this and maybe I'm just not understanding things but when "I read the docs":http://doc.trolltech.com/4.7/designer-resources.html I see the following paragraph at the very beginning:

    bq. Qt Designer fully supports the Qt Resource System, enabling resources to be specified together with forms as they are designed. To aid designers and developers manage resources for their applications, Qt Designer's resource editor allows resources to be defined on a per-form basis. In other words, each form can have a separate resource file.

    Please understand that I'm not arguing with you, I'm just reading the documentation and it seems to be saying that I can manage resources in Qt Designer. Perhaps I've missed something?



  • No problem, you're welcome. Sometimes it's hard to understand the questions, because we are so deeply into the matter and take things for granted :-)

    The resource editor you mentioned is for resources used in the form, not for the form itself.

    If you use Qt Creator, there is no need for Qt Designer at all, you can manage all things within Creator too. To add a new UI form, hit Ctrl-N and select "Qt" from "Files and Classes" on the left and then "Qt Designer form" on the right side. The Wizard will guide you through the steps and eventually create a .ui, .h and .cpp file for your design and implementation.

    You can find a good number of videos about Qt Creator on youtube - just load "QtStudio's channel":http://www.youtube.com/user/QtStudios.

    BTW: Release Candidate 1 (RC1) of Creator 2.1 is available, I'd strongly suggest to use this version, it is very stable and contains many improvements.



  • Thanks Volker - I know what you mean.

    Ok, let me explain a little more: I already have a form created, just like you describe and everything is good. Now I'm trying to add resources (icons) using the resource editor you mentioned. But I can't find the resource editor.

    That's my problem.



  • DemonGeek,

    Have you manage to insert a resource file? I understand your question completely because I was like you, reading from the same tutorial that gave me the impression that a resource browser tool existed within the Qt Creator.

    This is what I do to include a resource file into my project
    From menu --> File --> New File or Project --> under Files and Classes panel, choose Qt --> On your ride window select "Qt resource file"



  • Resources are managed in so called qrc files (Qt resource files). You cann add them the same way as as volker mentioned:

    To add a new UI form, hit Ctrl-N and select “Qt” from “Files and Classes” on the left and then “Qt Resource File” on the right side.

    It will appear under the folder Resources. Now you can double click the file and add resources directly. Is that what you were looking for?



  • Hi Gerolf, thanks. I have done what you suggested but it doesn't get me this mysterious Resource Editor/Browser that I'm reading about in the docs. I can add resources into the qrc file just like you said and then select them in Qt Designer but that's not exactly what the docs are describing.

    I keep posting "this link":http://doc.trolltech.com/4.7/designer-resources.html - that's what I'm looking for. The docs clearly state that a Resource Browser/Editor exists in Qt Designer and that it allows resources to be added/edited on a per form basis.

    Am I misunderstanding what I'm reading in the docs? Do you see those Resource Editor/Browser dialogs in Qt Creator when using the forms designer?





  • OK, I can see this is going nowhere fast. Zlatomir: I fully understand that there are two separate products called Qt Creator and Qt Designer but thanks for the screenshots anyway.

    I am talking about the Qt Designer that is embedded in Qt Creator, look at this screenshot, the relevant text is highlighted:

    http://imgur.com/jJdc2

    And this is what the embedded Qt Designer in Qt Creator looks like:

    http://imgur.com/rncJq

    And when I look through the Help docs supplied with Qt Creator I see this:

    http://imgur.com/M19vT

    At this point I'm just going to give up and assume that the embedded Qt Designer in Qt Creator contains a subset of the standalone Qt Designer functionality and that the docs are incorrect.

    Thanks to everyone who tried to help.



  • In the documentation for "Qt Creator":http://doc.qt.nokia.com/qtcreator-2.0.1/creator-design-mode.html the embedded designer doesn't have Resource Editor

    Only the "separated" designer has it.

    LE: you can only select resources like pixmap, etc... but the Resource editor is only in Creator (isn't "duplicated" in embedded designer too)



  • That's the same documentation that I found the references to the Resource Editor in (when I hit F1 in Qt Creator) - it seems that the docs refer to the standalone product and not the embedded version. I wish they actually stated that, it would have saved me wasting a lot of time.

    Thanks for your help Zlatomir.



  • It depends on how you navigate in the documentation

    Start "here":http://doc.qt.nokia.com/ click on Creator version you use
    then Developing Application UI and you have the Designer embedded in Creator
    see link: http://doc.qt.nokia.com/qtcreator-2.0.1/creator-design-mode.html

    In case you are outside of documentation for Creator they talk about stand-alone Designer.
    see link: http://doc.qt.nokia.com/4.7/designer-manual.html



  • Well I guess that might be true but just to illustrate what I mean: go to that link you provided "http://doc.qt.nokia.com/qtcreator-2.0.1/creator-design-mode.html":http://doc.qt.nokia.com/qtcreator-2.0.1/creator-design-mode.html, scroll down to the bottom of the page and you'll find the following link right there:

    bq. For more information on Qt Designer, see "Qt Designer Manual":http://doc.qt.nokia.com/4.7-snapshot/designer-manual.html.

    Which takes you to the standalone Qt Designer documentation that includes the details about the resource editor.

    And that's exactly what I did in the first place and is the reason for all this confusion. The docs are not at all clear - unless you already know what you're doing of course.



  • The documentation is indeed misleading. You could file an issue in the "bug tracker":http://bugreports.qt.nokia.com (possibly in the Qt Creator project), so the people in charge of the docs can fix it.



  • What the hell! Same problem here, why are they separated?? If I run Qt Designer stand alone I have the Resource Browser window, but inside Qt Creator not. Is very annoying and I think that demonGeek have an essential question: why are separated?

    It could be very useful have same functionality inside Qt Creator. Why is missing?

    Thanks in advance


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.