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. How to design a dialog that can be popped?
QtWS25 Last Chance

How to design a dialog that can be popped?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 357 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.
  • qazaq408Q Offline
    qazaq408Q Offline
    qazaq408
    wrote on last edited by
    #1

    The dialog look likes the pix.
    alt text
    if you click the button,the dialog will be poped,if you click the button again , the dialog will draw back.
    alt text
    It's screenshot of a game,but the my question is the same of it. My programme request a dialog that's called "PTX" by me on the bottom-right of parent dialog,if user click a button that's always at the far left of the "PTX", the "PTX" will pop,if user click the button again,the "PTX" will draw back , and user only can look the button.

    There's a request, the speed of pop of the "PTX" must not be finish in a flash. It need to cost about 0.5 second to pop or draw back "PTX" so that the user can look the whole process carefully.

    I put a custom QDialog on the bottom-right of the parent dialog ,there is a QTimer on the custom QDialog,when user click the button,the QTimer will be triggered. the code look like this

    connect(ati_Timer,SIGNAL(timeout()),this,SLOT(goMaxSize()));
    //....
    //....
    void PTX::goMaxSize()
    {
        static int len = width();
        len += 10;
        setFixWidth(len);
    }
    

    it lead to two question,first,when size of dialog is changed,the dialog always change size on left and right both,so i need change the point of "PTX" after it's changes size. On the whole proess,the move of "PTX" looks like...my boss say it looks like Brownian Movement on the Horizentel....
    second ,there are some pix on the "PTX",when "PTX" is popping or drawing back,user can look the pix is distorted carefully.

    Do you have any better idea?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Your images are not accessible.

      What exactly are you using for your game ? Widgets ? The graphics view framework ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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