Results 1 to 6 of 6

Thread: How to Display/Paint raw image data.

  1. #1
    Join Date
    Sep 2011
    Posts
    8
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default How to Display/Paint raw image data.

    Hi,

    I’m new to Qt.

    I’m using a QTabWidget. I want to display/paint raw image data in the tab area.

    Please guide me how can this be achieved. What factors/resources/widgets are to be considered to achieve this.

    Thanks for all suggestion and support.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to Display/Paint raw image data.

    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2011
    Posts
    8
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to Display/Paint raw image data.

    Hi,

    QTabWidget::setTabIcon() : As per my understanding is it used to set an icon for the tab. But, I'm trying to display/paint an entire 800X600 image in the tab area below.

    Please let me know how can it be achieved.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to Display/Paint raw image data.

    Oh, ok. Use QLabel then. Possibly inside QScrollArea.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Sep 2011
    Posts
    8
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to Display/Paint raw image data.

    Thank you.

    I'm using Qt creator.

    I have used Qt designer to create create MainWindow only.

    The following files are generated: main.cpp, mainwindow.cpp, mainwindow.h and mainwindow.ui. The class MainWindow inherits the class Ui_mainwindow generated from mainwindow.ui. Ui_mainwindow class is defined in the file ui_mainwindow.h which does not appear in the file explorer. I understand the ui_mainwindow.h is generated automatically from mainwindow.ui

    Further in the mainwindow.cpp, ui->setupUi(this) instantiate the screen. Please let me know what has to be done if I want to create QLabel and add this to UI through cpp file.

    Where should that peice of code be written. ?? Please dont mind answering my silly questions. Thanks a lot.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to Display/Paint raw image data.

    You can put the label directly in Designer. If you don't want to, there is a section in the docs describing how to blend Designer generated forms with your C++ code.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 2
    Last Post: 29th September 2008, 00:08
  2. Paint streaming pixel data
    By jmsbc in forum Qt Programming
    Replies: 4
    Last Post: 23rd September 2008, 04:15
  3. QGLWidget doesn't paint when I add another data member
    By Thoughtjacked in forum Qt Programming
    Replies: 6
    Last Post: 17th October 2007, 15:45
  4. Painter greyscale, image quality paint-brush!
    By patrik08 in forum Qt Programming
    Replies: 4
    Last Post: 22nd March 2007, 20:32
  5. Paint Rect visible on Drag to crop image coordinate
    By patrik08 in forum Qt Programming
    Replies: 8
    Last Post: 17th March 2007, 09:04

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.