Results 1 to 20 of 31

Thread: Image processing error

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Image processing error

    Could you explain why you did the thing Chris pointed out a couple of posts ago -- made MainWindow a member variable of a QDialog subclass?
    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.


  2. #2

    Default Re: Image processing error

    Can you give me a few link? I not yet reat it.
    ------------------------------------

    I'm trying "made MainWindow a member variable of a QDialog subclass"
    Last edited by bachkimfly; 6th October 2013 at 21:57.

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

    Default Re: Image processing error

    Quote Originally Posted by bachkimfly View Post
    I'm trying "made MainWindow a member variable of a QDialog subclass"
    Yes, we can see that. But why are you trying to do this?
    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.


  4. #4

    Default Re: Image processing error

    If don't made MainWindow a member variable of a QDialog, how to can executable event in QDialog. So what is your idea?

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

    Default Re: Image processing error

    Quote Originally Posted by bachkimfly View Post
    If don't made MainWindow a member variable of a QDialog, how to can executable event in QDialog.
    I don't understand what you mean.
    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.


  6. #6

    Default Re: Image processing error

    I want to catch event slider value changed, but brightness processing function which at MainWindow, if don't made MainWindow as a member variable of a BrightnessContrast dialog, i dont know to executable event slider value changed. your idea!

    P/s: now, it's 5:22 AM, a tonight don't sleep, i want to go to sleep

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

    Default Re: Image processing error

    Quote Originally Posted by bachkimfly View Post
    I want to catch event slider value changed, but brightness processing function which at MainWindow, if don't made MainWindow as a member variable of a BrightnessContrast dialog, i dont know to executable event slider value changed. your idea!
    Don't you already have an instance of the main window which launched the dialog? Do you understand the difference between a class and an instance of a class?
    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.


  8. #8

    Default Re: Image processing error

    Alright! I need have to initialize object of MainWindow class, right?. I asked in #9.
    So what is I can understand for "made MainWindow a member variable of a QDialog subclass". Patently, I misconstrued.

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

    Default Re: Image processing error

    Quote Originally Posted by bachkimfly View Post
    Alright! I need have to initialize object of MainWindow class, right?
    No, I'm assuming you already have such an object somewhere.

    Let's make a deal - if you keep ignoring my questions, I will start ignoring yours.
    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.


  10. #10

    Default Re: Image processing error

    Quote Originally Posted by wysota View Post
    No, I'm assuming you already have such an object somewhere.

    Let's make a deal - if you keep ignoring my questions, I will start ignoring yours.
    I don't ignore, I answered by the question "I need have to initialize object of MainWindow class, right?". That means I don't have an instance of the main window which launched the dialog and I understand the difference between a class and an instance of a class. I think so.

    But I feel we are going around.

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

    Default Re: Image processing error

    Did you initialize the imageLabel pointer with a QLabel instance? Can you show us the code where you did that?
    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.


  12. #12

    Default Re: Image processing error

    I did.
    Qt Code:
    1. MainWindow::MainWindow(QWidget *parent) :
    2. QMainWindow(parent),
    3. ui(new Ui::MainWindow)
    4. {
    5. ui->setupUi(this);
    6.  
    7. imageLabel = new QLabel;
    8. imageLabel->setBackgroundRole(QPalette::Base);
    9. imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
    10. imageLabel->setScaledContents(true);
    11.  
    12. scrollArea = new QScrollArea;
    13. scrollArea->setBackgroundRole(QPalette::Dark);
    14. scrollArea->setWidget(imageLabel);
    15. setCentralWidget(scrollArea);
    16. statusBar()->addWidget(ui->frame, 9);
    17. statusBar()->addWidget(ui->spinBoxZoom, 1);
    18. ui->frame->setFocus();
    19. //ui->mainToolBar->setStyleSheet("QToolBar{background-color: rgb(60,60,60);}");
    20. ui->mainToolBar->setBackgroundRole(QPalette::Window);
    21. }
    To copy to clipboard, switch view to plain text mode 

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

    Default Re: Image processing error

    I noticed now that the back trace you posted is missing two first frames. Can you post the complete backtrace?
    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: 4
    Last Post: 11th January 2013, 02:06
  2. Replies: 1
    Last Post: 13th December 2010, 12:19
  3. image processing
    By IRON_MAN in forum Qt Programming
    Replies: 4
    Last Post: 18th November 2009, 13:37
  4. Image processing
    By NicNac in forum Newbie
    Replies: 25
    Last Post: 2nd November 2008, 10:05
  5. Image Processing using Qt
    By danielperaza in forum Qt Programming
    Replies: 2
    Last Post: 9th March 2008, 18:15

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.