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. why show Popup function of comboBox is not working?
Forum Updated to NodeBB v4.3 + New Features

why show Popup function of comboBox is not working?

Scheduled Pinned Locked Moved Unsolved General and Desktop
combobox
2 Posts 2 Posters 422 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.
  • H Offline
    H Offline
    Himanshu Meena
    wrote on last edited by
    #1

    hii i am new to qt and just experimenting with some functions of comboBox.
    i have written the following code
    ui->comboBox->addItem("mark");
    ui->comboBox->count();
    ui->showPopup();
    in main window() of project
    this code has added mark to the comboBox if i write the following code

    ui->comboBox->addItem("mark");

    but count() and showPopup() are not working and following error is coming.
    class Ui::MainWindow has no member named show Popup.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bonnie
      wrote on last edited by Bonnie
      #2

      count() just return the number of items as the result, what do you expect it to work?
      showPopup() should be called on the combo box, so ui->comboBox->showPopup().
      Are you also new to C++? Feels like you need learn some basics first.

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved