Results 1 to 3 of 3

Thread: Can't get Qt App to look same under Windows and Linux - Need help

  1. #1
    Join Date
    Jun 2012
    Posts
    2

    Default Can't get Qt App to look same under Windows and Linux - Need help

    I have an Qt application that has a main window with dialogs that pop up full screen. Each dialog can pop up other full screen dialogs that cover up the preceding dialogs. Closing a dialog returns to the dialog that was hidden underneath it.

    This works really nicely under Windows.

    When I compile it for Linux the dialog boxes stack one below the other with the title bar of the previous dialog visible. (See attached image) I want each dialog to hide the previous ones, like they do under Window Qt.

    Why is this behavior different under Linux? How can I make this work? I am using running under Ubuntu Linux

    Thanks
    Attached Images Attached Images
    Last edited by FToe; 1st June 2012 at 21:13. Reason: Added Jpeg

  2. #2
    Join Date
    Jun 2012
    Posts
    2

    Default Re: Can't get Qt App to look same under Windows and Linux - Need help

    SOLUTION
    -----------------

    I fixed the Linux display issue by putting the following line in the Constructor for the Dialogs:

    this->move(parent->x(), parent(y));

    This line does not do any harm under Windows (it does nothing), but makes the dialogs stack properly under Linux

  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: Can't get Qt App to look same under Windows and Linux - Need help

    You should just use QStackedWidget instead of a series of separate windows.
    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. WebKit MUCH faster on Linux with same code
    By Guilo in forum Qt Programming
    Replies: 2
    Last Post: 21st June 2011, 19:42
  2. Replies: 11
    Last Post: 21st February 2011, 17:54
  3. How to profile the Qt projet (code) for ARM Linux
    By meena in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 15th September 2010, 14:23
  4. Replies: 4
    Last Post: 9th January 2008, 15:28
  5. C code linux to windows
    By deekayt in forum General Discussion
    Replies: 1
    Last Post: 19th October 2006, 22:17

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.