Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QDate causes my program to crash when I click the close button.
Forum Updated to NodeBB v4.3 + New Features

QDate causes my program to crash when I click the close button.

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 220 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    need4openid
    wrote on last edited by
    #1

    In my class I have:

    private:
        QLineEdit *edit1;
        QPushButton *button1;
        QDate date1, date2;
    

    I do not use date1 date2 at this moment yet, I just declared them. If I comment them out, my program does not crash:

    private:
        QLineEdit *edit1;
        QPushButton *button1;
        //QDate date1, date2;              // no crash
    
    J.HilkJ 1 Reply Last reply
    0
    • N need4openid

      In my class I have:

      private:
          QLineEdit *edit1;
          QPushButton *button1;
          QDate date1, date2;
      

      I do not use date1 date2 at this moment yet, I just declared them. If I comment them out, my program does not crash:

      private:
          QLineEdit *edit1;
          QPushButton *button1;
          //QDate date1, date2;              // no crash
      
      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @need4openid
      cool story

      but unless you disclose more code, ideally a minimal compellable example.
      Nonne will be able to help you efficiently.

      I throw a generic, did you make a clean build and rerun qmake? in the mix, but that's about all I can do from the current situation.


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      3
      • N Offline
        N Offline
        need4openid
        wrote on last edited by
        #3

        qmake and rebuild all solved the issue! Thank you!

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved