Changeset 372 for trunk/tools/designer/src/lib/shared/qdesigner_dnditem.cpp
- Timestamp:
- Dec 2, 2009, 4:30:02 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/designer/src/lib/shared/qdesigner_dnditem.cpp
r2 r372 154 154 drag->setPixmap(QPixmap::fromImage(image)); 155 155 #else 156 156 157 drag->setPixmap(widgetPixmap); 158 157 159 #endif 158 160 } … … 189 191 QPixmap pixmap = QPixmap::fromImage(image); 190 192 pixmap.setMask(mask); 193 191 194 drag->setPixmap(pixmap); 195 192 196 } 193 197 break; … … 197 201 m_globalStartPos = m_items.first()->decoration()->pos() + m_items.first()->hotSpot(); 198 202 m_hotSpot = m_globalStartPos - decorationTopLeft; 203 199 204 drag->setHotSpot(m_hotSpot); 200 205 201 206 drag->setMimeData(this); 207 202 208 } 203 209 … … 219 225 return Qt::IgnoreAction; 220 226 227 221 228 QDrag *drag = new QDrag(dragSource); 222 229 QDesignerMimeData *mimeData = new QDesignerMimeData(items, drag); … … 237 244 238 245 return executedAction; 246 247 248 239 249 } 240 250 … … 270 280 void QDesignerMimeData::acceptEventWithAction(Qt::DropAction desiredAction, QDropEvent *e) 271 281 { 282 272 283 if (e->proposedAction() == desiredAction) { 273 284 e->acceptProposedAction(); … … 276 287 e->accept(); 277 288 } 289 278 290 } 279 291
Note:
See TracChangeset
for help on using the changeset viewer.