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 Eclipse basic question
Forum Updated to NodeBB v4.3 + New Features

Qt Eclipse basic question

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

    Hi again, I'm new with Qt. using the Qt Eclipse integration, I want to build a really simple program.
    First, if I want a box that user can enter values, but it has to be integers. How do I limit that? eg. if I use line edit, it takes any characters?

    Second, in the Main.cpp, how do I make multiple widgets go on the same window. Right now, I have a couple of buttons/labels, but each one show a different window.
    eg.

    @
    QLabel *msg= new QLabel ("Welcome!");
    msg->show();
    QPushButton *close=new QPushButton("close");
    QObject::connect (close, SIGNAL(clicked()),&a, SLOT(quit()));
    equal->show();
    @

    Sorry, I'm really a beginner to Qt. Thanks in advance

    [EDIT: code formatting, please wrap in @-tags; Volker]

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kkrzewniak
      wrote on last edited by
      #2

      I think what You are looking for is a SpinBox. And really why do You need to use Eclipse isn't QtCreator an option? In my mind, making someone use Eclipse is a very harsh form of punishment.
      "C++-GUI-Programming-with-Qt-4-1st-ed.":http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip

      Me, Grimlock, not "nice dino". ME BASH BRAINS!

      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