Qt and files in shared folders - qt

Can I use Qt to pick/open files on shared folder?
I've tried to use QFileDialog, but it seems that there is no "network" category, as in standrd windows explorer.

You need to specify which version of Qt you are using. Versions 4.7+ have support for native file dialogs and use them by default. See the accepted answer here:
QFileDialog alternative that uses default file dialog defined by OS?
In previous versions, there was no easy way to show network shares in the QFileDialog on Windows.

Related

Is it possible to delete a project from within Qt creator?

I am using Qt Creator 3.3.2 and I wonder if it is possible to completely delete a project from within the Creator. Of course I could use my windows explorer and manually delete the files, but for convenience I would like to do it from the IDE. Is it possible?
The closest I could find is this question, but if I understand it correctly it is about removing the project from Qt Creator while keeping the source files.
No, there is no such feature. You can ask to delete a specific file of your project by right-clicking it in the project explorer, but you can't delete a whole project, you'll have to do it from your OS's file browser.

Sublime Text 2 - Changing the icon on Windows

As the title says, how do you change Sublime Text 2 default icon on Windows(7 or 8)?
I've searched everywhere. I found the post by Jeffrey Way on Nettuts that explains how to change it on the Mac and it was as simple as putting the 'nameoftheicon.icns' file somewhere in the default folder.
Now I have two problems:
1) I can't find the folder where the icns file should be put in
2) on Git(or somewhere else) when I find the repo of an icon the things to do in order to change it, even on the Mac, are way longer than Jeff's post
I wish the Windows folder was specified in that post to but it isn't(as you know he works on Mac).
So basically what's the fastest way to change the icon, maybe just by putting the icns files somewhere and avoiding the download of external software(as some Git repos suggests)?
There is no way of changing the icon on Windows without editing either the sublime_text.exe file or one of the libraries with an external program. It's just one of the many, many differences between Windows and Mac. .icns files are specific for the Mac platform, and don't exist in the Windows versions of Sublime Text.
There is no easy/fast method to change an application icon once its been compiled, however you can use a tool like Resource Tuner to alter the resources embedded within it.
Its worth noting that if you do use Resource Tuner it only supports 32bit binaries which means you will need to modify the 32bit version of Sublime. You can adjust the four icons defined there (16,32,48 256), you will need to create your own individual ICO files for each 32bit resource, import them using resource tuner and then save our .exe
An altered 32bit version of the .exe and .ico resources are here : https://copy.com/S7kKk6rh2Q3P12iu (nothing malicious however use at your own risk)
suggest https://github.com/dbmzzo/Sublime-Text-2-Icon
may help. BTW, it provide solution of changing icon in Win\Ubuntu\Mac

Qt - QImage works on one computer and not on another [duplicate]

I set a background image(JPEG) on a Qt widget using setStyleSheet(). This is perfectly shown on my computer, but not on another computer.
I am not getting a link error on the other computer -- the feature just doesn't work. Is there something I am missing in the distribution or build of my app, something that the Qt dev tools installs or is otherwise available, that isn't present on other machines? How can I distribute a Qt app that uses JPEG functionality?
JPEG support in Qt comes as a plugin. Make sure you have also deployed the plugin to your non-development machine. If you haven't, it will simply silently fail and you'll end up not seeing any of the JPEG images. Have a look at the official documentation for more detailed information: http://qt-project.org/doc/qt-4.8/deployment-windows.html
In short (and as a quick solution, but have a look at the documentation as well) you could create a directory named "imageformats" as a subdirectory of the folder containing your exe, into which you copy QJPEG4.dll.

Is there a way to run Qt Creator from command line supplying a .pro file to open (or how do we deal with multiple Qt installations)?

I have multiple installations of Qt4 on my Windows XP SP2 machine and have installed Qt Creator 2.1 today. However, running the project (.pro) files spawns the oldest version of Qt Designer installed (the one installed in 2009 together with the rest of the framework).
Since
I would not like to remove any previous installations of Qt
and for some obscure reason even if I explicitly ask Windows Explorer to always use the version I need it does not
I would like to give up a bit and just sript the needed behaviour in a .bat file like:
e:\path\to\qtcreator.exe %1
This opens Qt Creator, but something seems to prevent it from treating the .pro file properly (in short, the project does not "open" as it should).
Qt documents have a page on the matter at Qt Creator: Using Command Line Options, but it seems to ignore the topic in question.
Since Qt (being as excellent framework as it is) is also known to have its quirks (like that of qmake), I wonder, may be there is an undocumented way to solve my problem?
(Another way to fix the thing would of course be to make the correct version of Qt Designer run, but frankly I'd prefer the "hard-wired" solution since the mechanisms provided by Qt itself are still a bit unreliable.)
The libraries and tools used for a particular project (and a configuration in it) is set in the Projects panel in Qt Creator:
http://doc.qt.io/qtcreator/creator-build-settings.html
Selecting the Qt version to use with a project should force it to run the Designer that's part of the version. If it doesn't, then you should report it as a bug.

Get Qt to use the native Windows copy file widget

Excusing the actual folders used as an example, I want to achieve the following two widgets in Qt (the backend is similar to files, but not exactly filesystem files):
folder-replace-dialog and copy-file-dialog
I know Qt can do the native save-file widget (using QFileDialog static methods), but can it do the folder replace/file copy dialogs as well? Any suggestions?
You might have to call the Windows SHFileOperation directly for this. It should be possible whether your using gcc or the MS C++ compiler. You'll need to fill in the SHFILEOPSTRUCT but that shouldn't pose too much of a problem.

Resources