Results 1 to 6 of 6

Thread: UI to preview pictures and music

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2010
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default UI to preview pictures and music

    Hi,

    I just found out Qt not long ago and really like its interface. But it's kinda complicated when most of the examples are pure coding. I'm trying to do it with the design part...
    Right now I'm making a file viewer. So I have a treeView, a graphicsView, a listView and buttons.



    I worked out how to put a directory browser in the treeView, and when a file clicked, the path goes to the lineEdit. Now I want the graphicsView to show the picture if one is clicked in the treeList. And the path of the music will go to the listView when button Add is pressed. Any advice how to do that?

    I'd appreciate if you actually explain it so I can understand, I don't like "copy and paste" the code, it makes me feel very bad.

  2. #2
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: UI to preview pictures and music

    You've reached the point where you need to start coding. It is a good sign that you feel bad just copy/pasting the code, but that shouldn't hold you from it when learning. If you are going to copy/paste, find out what the piece of code does. In your case it would be good to start learning about signals and slots. Then, since you are using views, learn about model/view programming.

    We can say a lot about what you should do, but we can only be really helpful if we know what exactly you do not understand.

    In any case:
    Write a slot that copies the current string value from your line edit to the list view.
    Write a slot that loads a picture from a file and passes it to the graphics view (look at the drop-site example for similar behavior).
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

Similar Threads

  1. Replies: 19
    Last Post: 13th May 2013, 11:17
  2. Do you listen music while programming?
    By Raccoon29 in forum General Discussion
    Replies: 20
    Last Post: 30th January 2011, 08:49
  3. Free music for a software
    By ale6111 in forum General Programming
    Replies: 3
    Last Post: 28th July 2010, 07:47
  4. Programmer for Music Application
    By jlazarus in forum Jobs
    Replies: 0
    Last Post: 29th January 2010, 03:57
  5. playing music from a database
    By Baasie in forum Qt Programming
    Replies: 5
    Last Post: 19th January 2010, 10:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.