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. QT Emails input widget
Qt 6.11 is out! See what's new in the release blog

QT Emails input widget

Scheduled Pinned Locked Moved General and Desktop
qlistwidgetqlistview
2 Posts 1 Posters 1.3k Views 1 Watching
  • 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.
  • D Offline
    D Offline
    deynekoaa
    wrote on last edited by deynekoaa
    #1

    I want input emails widget like on Google email or other emails service. For example:
    http://postimg.org/image/7pnb42gyj/

    I find the solution with qlistwidget with icons mode and qlineedit. I want to input to qline edit a text, and when i press enter a new emails from qlineedit sets to qlistwidget. But, qlineedit not showing in qlistwidget. How to fix it?

    qhbl = new QHBoxLayout();
    qlw = new QListWidget();
    qlw->setViewMode(QListWidget::IconMode);
    qlw->setMovement(QListWidget::Static);
    qlw->setResizeMode(QListWidget::Adjust);

    connect(qlw, SIGNAL(customContextMenuRequested(const QPoint &)),
             SLOT(showContextMenuForWidget(const QPoint &)));
    qlw->setContextMenuPolicy(Qt::CustomContextMenu);
    
    
    addNewElement("test111111111");
    addNewElement("test222222222");
    addNewElement("test3333");
    addNewElement("test4444");
    
    QListWidgetItem* qlwiItem1 = new QListWidgetItem("test!");
    QPushButton* test = new QPushButton();
    test->setText("pushbutton");
    qlw->addItem(qlwiItem1);
    
    
    QListWidgetItem* qlwiItem = new QListWidgetItem();
    qle = new QLineEdit();
    qle->setText("input");
    connect(qle, SIGNAL(returnPressed()), this, SLOT(addNewElement()));
    qle->setFixedWidth(100);
    qle->setMinimumWidth(90);
    qle->setMaximumWidth(110);
    qlw->addItem(qlwiItem);
    qlw->setItemWidget(qlwiItem, qle);
    qlw->setStyleSheet("QListWidgetItem {border:1px}");
    qhbl->addWidget(qlw);
    ui->centralWidget->setLayout(qhbl);
    
    1 Reply Last reply
    0
    • D Offline
      D Offline
      deynekoaa
      wrote on last edited by deynekoaa
      #2
      This post is deleted!
      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