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. Maximize/FullScreen Windows TaskbarMenu Messages
QtWS25 Last Chance

Maximize/FullScreen Windows TaskbarMenu Messages

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 5.0k 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.
  • B Offline
    B Offline
    bu7ch3r
    wrote on last edited by
    #1

    Hello,
    I have a custom main dialog made using QT. The problem is that minimize, maximize and restore buttons have their own logic and they work as they should. The problem came when I have added new flags for that dialog:

    @
    Qt::WindowFlags flags = windowFlags();
    flags |= Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint ;
    setWindowFlags(flags);
    @

    When i choose maximize dialog resizes to fullscreen ignoring the taskbar. A good help for me will be if i could somehow override the methods/signals/events that occur when you click on the system menu elements. I have tryed to catch WindowStateChange and call my resize methods there. After they are being called my main dialog resize again to fullscreen.

    @

    if( (event->type() == QEvent::WindowStateChange) )
    {
    QWindowStateChangeEvent * windowStateChangeEvent(static_cast<QWindowStateChangeEvent *>(event));

    if (windowState().testFlag(Qt::WindowMaximized ) )
    {
    on_maximizeButton_clicked(); //This method works ok when I click on the app's button
    }
    return QDialog::event(event);
    @

    Thank You for your help

    for(int i = 200; i > 0;)
    try
    {
    //do something
    }
    catch(...)
    {
    i--;//try again
    }

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bu7ch3r
      wrote on last edited by
      #2

      :(

      for(int i = 200; i > 0;)
      try
      {
      //do something
      }
      catch(...)
      {
      i--;//try again
      }

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mlong
        wrote on last edited by
        #3

        [quote author="bu7ch3r" date="1317642682"]:([/quote]

        Why the sad face? Be patient.

        Software Engineer
        My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          [quote author="bu7ch3r" date="1317642682"]:([/quote]

          6 hours and you're crying for an answer? Get real! A bump of an unanswered post is acceptable after waiting for several days, not hours.

          As far as I know you will have to use native, i.e. platform dependent, code and API to intercept these events.

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bu7ch3r
            wrote on last edited by
            #5

            :)) at my last post someone answered in minutes. Time is not a problem :) I can wait. If I won't receive any answer I shall use WINAPI :)

            for(int i = 200; i > 0;)
            try
            {
            //do something
            }
            catch(...)
            {
            i--;//try again
            }

            1 Reply Last reply
            0
            • B Offline
              B Offline
              bu7ch3r
              wrote on last edited by
              #6

              So I think there is a bug. If I set my main app with:
              @
              ( Qt::FramelessWindowHint | Qt::WindowSystemMenuHint | Qt::WindowMaximizeButtonHint | Qt::WindowMinimizeButtonHint )@

              Whe I call showMaximized() i get fullscreeen.

              If I remove FramelessWindowHint flag everything works great but I get a frame and I don't want that.

              The problem is still about how to catch taskbarmenu/systemenu messages....

              for(int i = 200; i > 0;)
              try
              {
              //do something
              }
              catch(...)
              {
              i--;//try again
              }

              1 Reply Last reply
              0

              • Login

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