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. Unable to restore my Application
Forum Updated to NodeBB v4.3 + New Features

Unable to restore my Application

Scheduled Pinned Locked Moved Unsolved General and Desktop
26 Posts 8 Posters 2.2k Views 3 Watching
  • 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.
  • JKSHJ JKSH

    @ELEMENTICY said in Unable to restore my Application:

        w.setWindowState(Qt::WindowMaximized);
    

    What happens if you remove this line?

    E Offline
    E Offline
    ELEMENTICY
    wrote on last edited by
    #16

    @JKSH still cant restore,just when start,its not fullscreen mode.

    J.HilkJ 1 Reply Last reply
    0
    • E ELEMENTICY

      @JKSH still cant restore,just when start,its not fullscreen mode.

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #17

      @ELEMENTICY
      and

      QApplication a(argc, argv);
          QWidget w;
          w.resize(50,50);
          w.setWindowState(Qt::WindowMaximized);
          w.show();
      

      behaves the same? what OS and window manager do you use?


      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.

      E 2 Replies Last reply
      0
      • J.HilkJ J.Hilk

        @ELEMENTICY
        and

        QApplication a(argc, argv);
            QWidget w;
            w.resize(50,50);
            w.setWindowState(Qt::WindowMaximized);
            w.show();
        

        behaves the same? what OS and window manager do you use?

        E Offline
        E Offline
        ELEMENTICY
        wrote on last edited by
        #18

        @J-Hilk windows 10

        1 Reply Last reply
        0
        • J.HilkJ J.Hilk

          @ELEMENTICY
          and

          QApplication a(argc, argv);
              QWidget w;
              w.resize(50,50);
              w.setWindowState(Qt::WindowMaximized);
              w.show();
          

          behaves the same? what OS and window manager do you use?

          E Offline
          E Offline
          ELEMENTICY
          wrote on last edited by
          #19

          @J-Hilk and yea it doesnt work.Also its MainWindow Why dont you trust me xD

          Pl45m4P 1 Reply Last reply
          0
          • E ELEMENTICY

            @J-Hilk and yea it doesnt work.Also its MainWindow Why dont you trust me xD

            Pl45m4P Online
            Pl45m4P Online
            Pl45m4
            wrote on last edited by
            #20

            @ELEMENTICY

            Because it's nearly impossible that you can't resize your window, when you didn't change anything. There must be some settings that got changed.

            Have you tried to create an empty project and resize / restore the MainWindow there? Does it work?
            Have you checked your design file? Have you made changes there?


            If debugging is the process of removing software bugs, then programming must be the process of putting them in.

            ~E. W. Dijkstra

            E 1 Reply Last reply
            0
            • Pl45m4P Pl45m4

              @ELEMENTICY

              Because it's nearly impossible that you can't resize your window, when you didn't change anything. There must be some settings that got changed.

              Have you tried to create an empty project and resize / restore the MainWindow there? Does it work?
              Have you checked your design file? Have you made changes there?

              E Offline
              E Offline
              ELEMENTICY
              wrote on last edited by
              #21
              This post is deleted!
              JonBJ 1 Reply Last reply
              0
              • E ELEMENTICY

                This post is deleted!

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by JonB
                #22

                @ELEMENTICY
                It's usual to supply a minimal example, if you want others to look at it. Yes, that requires reducing one's own code till it is minimal; funnily enough, often that reveals what the problem is. I see , say, 100+-odd lines. Your problem only appears when you open/double-click files, double click items, and have loads of triggers? Otherwise the restoring works OK?

                E 1 Reply Last reply
                1
                • JonBJ JonB

                  @ELEMENTICY
                  It's usual to supply a minimal example, if you want others to look at it. Yes, that requires reducing one's own code till it is minimal; funnily enough, often that reveals what the problem is. I see , say, 100+-odd lines. Your problem only appears when you open/double-click files, double click items, and have loads of triggers? Otherwise the restoring works OK?

                  E Offline
                  E Offline
                  ELEMENTICY
                  wrote on last edited by
                  #23

                  @JonB okay i will delete the message lol

                  JonBJ 1 Reply Last reply
                  0
                  • E ELEMENTICY

                    @JonB okay i will delete the message lol

                    JonBJ Offline
                    JonBJ Offline
                    JonB
                    wrote on last edited by JonB
                    #24

                    @ELEMENTICY
                    I didn't mean you to do that. But, in the nicest way: since the rest of us have no problem, and I think you're saying you only have a problem in your main window, it would help both you & us of you strip your code down till you have a minimal example of whatever you say is wrong. When I post code here for a problem I have I reduce to the absolute minimum which shows it, not one extra unnecessary line! You might even find that in doing so you discover what your issue is yourself!

                    For example, earlier @J-Hilk asked you:

                    QApplication a(argc, argv);
                        QWidget w;
                        w.resize(50,50);
                        w.setWindowState(Qt::WindowMaximized);
                        w.show();
                    
                    1. Does this show your problem, yes or no?
                    2. Change to QMainWindow w. Does this show your problem, yes or no?
                    E 1 Reply Last reply
                    2
                    • JonBJ JonB

                      @ELEMENTICY
                      I didn't mean you to do that. But, in the nicest way: since the rest of us have no problem, and I think you're saying you only have a problem in your main window, it would help both you & us of you strip your code down till you have a minimal example of whatever you say is wrong. When I post code here for a problem I have I reduce to the absolute minimum which shows it, not one extra unnecessary line! You might even find that in doing so you discover what your issue is yourself!

                      For example, earlier @J-Hilk asked you:

                      QApplication a(argc, argv);
                          QWidget w;
                          w.resize(50,50);
                          w.setWindowState(Qt::WindowMaximized);
                          w.show();
                      
                      1. Does this show your problem, yes or no?
                      2. Change to QMainWindow w. Does this show your problem, yes or no?
                      E Offline
                      E Offline
                      ELEMENTICY
                      wrote on last edited by
                      #25

                      @JonB Btw,what if i wanna keep these trigger?Cuz its important for my Text Editor.

                      JonBJ 1 Reply Last reply
                      0
                      • E ELEMENTICY

                        @JonB Btw,what if i wanna keep these trigger?Cuz its important for my Text Editor.

                        JonBJ Offline
                        JonBJ Offline
                        JonB
                        wrote on last edited by
                        #26

                        @ELEMENTICY
                        I'm not with you? Of course you can keep whatever code you want for your application, I was only talking about removing everything unnecessary while you post your minimal code/diagnose what the problem is. Then you can put whatever back in.

                        Meanwhile, I showed you 5 lines of code, and asked for a "yes" or "no" as to whether it worked for you with a QWidget versus with a QMainWindow, which you say is where your real problem lies?

                        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