摘要:
1. 控件位置的确定控件的位置一般来说是相对其父的其左上角的坐标:QWidget *w = new QWidget(this);QPoint p = w->pos();int x = p.x();int y = p.y();若要得到其针对全局界面的坐标值,则需要转换一下,用mapToGlobal():QPoint p(0, 0);int x = mapToGlobal(p).x();int y = mapToGlobal(p).y();2. QWidget(1) 对widget的显示和隐藏QWidget *w = new QWidget(this);w->setHidden(tru 阅读全文
posted @ 2012-12-09 16:35
梓涵VV
阅读(1703)
评论(0)
推荐(0)

浙公网安备 33010602011771号