Results 1 to 5 of 5

Thread: Open a image from the QTableWidget

  1. #1
    Join Date
    Feb 2010
    Posts
    61
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Open a image from the QTableWidget

    hi,

    my app contains a table widget in which one of the column contains path where the image stored in my sys.
    so when i select that column and press show image button . i should display the image .

    Could any one suggest me , an easier way to do this?

    Thnkz in advance.

    @qtlinuxnewbie.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Open a image from the QTableWidget

    Quote Originally Posted by qtlinuxnewbie View Post
    an easier way to do this?
    For doing what exactly?

  3. #3
    Join Date
    Feb 2010
    Posts
    61
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Open a image from the QTableWidget

    to display the image
    i mean
    wht is the easier way.
    like : when show image button clicked .. image is shown any web browser or any qt widget etc.,,

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Open a image from the QTableWidget

    Well then simply connect the clicked signal with a custom slot where you read the full path of your image and send a proper signal, like showImage("/path/to/file.png"). Connect that signal to any other part of your application create a Pixmap out of the path and display it. (Or react direct on the clicked signal without sending a second signal. This depends on your design.)

  5. #5
    Join Date
    Feb 2010
    Posts
    61
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Open a image from the QTableWidget

    create a Pixmap out of the path and display it.
    i have done the job.
    is it possible to open that image in any image viewers.?
    i am working in Linux

    @qtlinuxnewbie

Similar Threads

  1. Background Image in QTableWidget
    By mclark in forum Qt Programming
    Replies: 11
    Last Post: 6th June 2012, 17:06
  2. Replies: 3
    Last Post: 25th August 2010, 12:39
  3. Why QSqlDatabase::open() returns open?
    By gboelter in forum Newbie
    Replies: 7
    Last Post: 27th August 2009, 18:52
  4. IE6 fails to open image by ftp
    By sinha.ashish in forum Qt Programming
    Replies: 4
    Last Post: 14th April 2008, 13:37
  5. Open image in full screen
    By jeetu_happy in forum Qt Programming
    Replies: 3
    Last Post: 23rd January 2007, 09:03

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.