QDir and QDir::entryList().
QDir and QDir::entryList().
Or may be QFileDialog::getOpenFileNames .
QFileDialog::getOpenFileNames(this,"Select one or more files to open","/home","Images (*.png *.xpm *.jpg)");
Thanks guys for all your help, i'm making progress on my application. Next mission, I want to customize buttons by say linking the file browsing action with a button. The only options i can find is the ones preinstalled. should i define my own slots or is there a better way?
Read a tutorial and browse Qt Assistant please![]()
aurelius (30th October 2008)
Hi,
i am trying to do a slideshow. I have the images load and everything else work i.e. next, back between the pictures.
I would like to automate it with Qtimer, i call the method to start the slideshow in the method i use the Qtimer like this:
Qt Code:
connect(timer, SIGNAL(timeout()), this, SLOT(nextPicture())); timer->start(30000);To copy to clipboard, switch view to plain text mode
Is this the write way?
Yes, this is ok.
Hi, I am a newbie in QT4, however really enthusiastic with all the capabilities of it.
What I want to do is to have a grid of images, and display them, like this program
http://www.youtube.com/watch?v=kVcTMAUr3Bw
I mean, I want to display them in a grid and if possible, when I resize the window, the grid and the images contained in it to adjust. I guess I will have to follow
these instructions:
Is this right? I guess, in order for the images to adjust, I will have to use grid layout. Because I can't really recall right now, is it possible to dynamically add widgets inside the QGridLayout, that is I check what images are contained in a directory and display them in a grid mode ? Is this right?
Do you have any other advice or sample code that does sth similar?
P.S. I just found this forum, which was a relief, because the tutorials in QT4 website are basic.
I think this is dome using GraphicsView so take a look at QGraphicsView and QGraphicsScene.
aurelius (30th October 2008)
Thanx for the quick answer.
Do you know iff there is somewhere some demo code for QGraphcisScene etc ? Of course, I will try to figure out how it works, but it's kinda difficult by just reading the properties of it, since I am just a beginner.
Ok, I just realized that there are some tutorials in QT4 site.
Last edited by aurelius; 29th October 2008 at 17:24.
Open a terminal and type in "assistant".
aurelius (30th October 2008)
I use Ubuntu 8.04 and I program with just a text editor and console. Unfortunately the repositories don't have the latest version of Qt, so QGraphicsProxyWidget are not part of the library. Of course, I don't know if it's even useful, but ok, I just don't have access on it. Also, there are not the functions that are related to it, such as the addWidget in QGraphicsScene. This function I guess it's really important. I downloaded and compiled the newer version of Qt, however the makefile throws error. I use a modified qmake that I took from a QDevelop program and it has some include paths. I changed them and it suddenly started to throw some errors. Do you have any qmake that it would work properly?
I think I will have to create my own makefiles with my own qmake, but that is a problem.
Whatsoever, I tried to do sth with grid layout. I managed to put two images in a grid layout, so I guess I can do it for more images. However, I don't know how to do it, so as automatically to change for the position of those images acoording to the with of the main window. I will try to make QGraphics class work properly, but do you have any idea for this as well?
Last edited by aurelius; 29th October 2008 at 20:13.
Not in your case. You need a plain graphicsview and QGraphicsPixmapItems.
Always use only the instance of qmake that comes with your installation, be it a binary or an own build originated.Do you have any qmake that it would work properly?
No, you need to read a tutorial or two. Don't make things more complex than they are.I think I will have to create my own makefiles with my own qmake, but that is a problem.
Forget it. Read about QGraphicsView, pretty please.Whatsoever, I tried to do sth with grid layout. I managed to put two images in a grid layout, so I guess I can do it for more images.
Bookmarks