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. Browser : QLineEdit and QListView (url field) positions

Browser : QLineEdit and QListView (url field) positions

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 1.6k 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.
  • Y Offline
    Y Offline
    Yacinoben
    wrote on last edited by
    #1

    Hello,
    I program a browser and I need when I change the text in QLineEdit a QListView(contain the history of visited pages) appears .

        QHBoxLayout *layout_navigator_tool=new QHBoxLayout;
        layout_navigator_tool->addWidget(button_back_page);
        layout_navigator_tool->addWidget(button_next_page);
        layout_navigator_tool->addWidget(button_reload_page);
        layout_navigator_tool->addWidget(url_field);//QLineEdit
        layout_navigator_tool->addWidget(word_search);//QLineEdit
        layout_navigator_tool->addWidget(button_zoom_page);
        layout_navigator_tool->addWidget(button_zoom_out_page);
        layout_navigator_tool->addWidget(button_option_page);
    
        QVBoxLayout *layout_navigator=new QVBoxLayout;
        statubar->addWidget(page_load_progress);
        layout_navigator->addLayout(layout_navigator_tool);
        layout_navigator->addWidget(page_view);
        layout_navigator->addWidget(statubar);
        widget->setLayout(layout_navigator);
    

    My problem , I don't know how I can show QListWidget below url_field.
    Thank !

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

      Hi,

      You can put both url_filed and your QListView in a QVBoxLayout and insert that layout after button_reload_page.

      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
      0
      • Y Offline
        Y Offline
        Yacinoben
        wrote on last edited by
        #3

        I tried this, but the result isn't good

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

          Why is that ?

          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
          0
          • Y Offline
            Y Offline
            Yacinoben
            wrote on last edited by
            #5

            http://imageshack.com/a/img921/3816/j0v0PE.png

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

              Why not use a QComboBox for that ? With a QCompleter to get old entries

              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
              • Y Offline
                Y Offline
                Yacinoben
                wrote on last edited by
                #7

                It works, i used QCompleter
                Thank's !!!

                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