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. Modal QDialog with VirtualKeyboard (inputPanel)
Forum Updated to NodeBB v4.3 + New Features

Modal QDialog with VirtualKeyboard (inputPanel)

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 2.1k 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.
  • M Offline
    M Offline
    mostefa
    wrote on last edited by mostefa
    #1

    Hi guys,

    I have a widget that show modal QDialog when button is clicked, this modal dialog contains QLineEdit.

    And I need to write text with (virtualkeyboard) inputpanel on my QLineEdit , but cause my QDialog need to stay modal (due to customer need) , when i click out this dialog nothing will respond even the keyboard .

    What i want to do is to keep my QDialog modal , and let QDialog accept click outside if the click is on the input panel.

    See this picture for more details:

    alt text

    Is there any way to do this?

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      Who's your daddy?

      i.e. could you tell us the parent of each of the 3 items in the picture?

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

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

        Hello VRonin,

        parent of all items is widget , it's my mainWidget, for information this is my main.cpp

        
        QApplication app(argc, argv);
        
        MyInputPanelContext *ic = new MyInputPanelContext;
        app.setInputContext(ic);
        
        QWidget widget;
        Ui::MainForm form;
        form.setupUi(&widget);
        widget.show();
        
        Dialog* mDialog = new Dialog(&widget);
        mDialog->setModal(true);
        QObject::connect(form.pushButton,SIGNAL(clicked(bool)),mDialog,SLOT(show()));
        return app.exec();
        1 Reply Last reply
        0
        • VRoninV Offline
          VRoninV Offline
          VRonin
          wrote on last edited by VRonin
          #4

          Ok, I'm not familiar with QInputContext and as, it was discontinued in Qt5, I'm unable to test it.

          My question derived from the fact that I thought you could reparent the "Input Panel" to the new dialog to make it work

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mostefa
            wrote on last edited by
            #5

            Sadly not, :'(

            thanks anyway, any other help?

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mostefa
              wrote on last edited by
              #6

              uppppppp

              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