English 中文(简体)
QSlider没有消 s
原标题:QSlider is not sliding

在某种程度上,我的QSlider并不.。 我只能够点击梯子,然后电梯改变他的立场。 我检查了一些例子,但一切似乎都是一样的。

Here is one of my QSliders:

QSlider  *obj_scale_x= new QSlider(Qt::Horizontal);
obj_scale_x->setValue(10);
obj_scale_x->setToolTip(tr("Scale object"));
obj_scale_x->setRange(1,50);
obj_scale_x->setTickPosition(QSlider::TicksAbove);
connect(obj_scale_x, SIGNAL(valueChanged(int)), this, SLOT(objScale_x(int)));

我认为,问题可能是 mo。 但是,这既未奏效。

void OpenGLScene::mousePressEvent(QMouseEvent *event)
{ 
    lastPos = event->pos();
}

void OpenGLScene::mouseMoveEvent(QMouseEvent *event)
{
    lastPos = event->pos();
}

我正在对位于QGraphicsScene的班级的Slider进行定义。 这可能是这样,但我是在我的证人的末尾。

问题回答

回答您的问题或许是:

obj_scale_x->setTracking(true);

保证您不会有<代码>eventFilter(>)的界定,用于在ID等级上较高的物体;如果是,如果对活动没有直接反应,则确保它不会“吞ow”(即:BaseClass:eventFilter(obj, event))。

这解决了我的问题。





相关问题
How to start to create an application GUI using C#?

HI! I am new to C# and plan to use it for my application GUI. I am trying to make my GUI similar to SPSS:http://www.spss.com/images/08/statistics_screens/ez_rfm-big.jpg Is this easy in C#? Is there ...

Automatic height of edit box

My shoes application has three items stacked on top of each other (with a stack, of course), in order: A banner An edit box Two buttons in a flow What I want to do is have the banner stay at it s ...

Search by using the keyboard in a list/grid - algorithm

I need to implement a custom search in a grid and I would like to find some user interface guidelines that explain the standard way to implement it. I mean this kind of search that is initiated by ...

UI And TcpClient Issue in vb.net

I m having some problems with a small ircbot i m writing. Basically I connect to the server using a tcpclient in a seperate class, which also runs on its own thread. I want to display the server text ...

UI Convention: Shortcut key for application exit? [closed]

Is there a convention for the shortcut keys for application exit? Some applications uses Alt+X some others use Ctrl+ X and Ctrl+Q. Applications like FF and IE doesnot assign a shortcut at all. So is ...

热门标签